Beruflich Dokumente
Kultur Dokumente
Time 1.5
1) Which property would you use for setting the password character as $?
1
2) What is the use of Default clause in Switch statement?
1
3) A phone No. consisting of 10 digits is stored in a string type variable strphone.
Now it is required
to store this Phone no in a long type variable lngphone . Write a Java statement
to do the same.
4) Write the statement to import JOptionPane Class.
1
5) Write statement to check if the Check Box chkmember is selected or not.
1
6) Write the code so that the user can only view the content of JTextField but
cannot edit it.
1
7) Write one common method & one Common property of JList & JCombo.
1
8) Write the difference between <P> tag and <BR> Tag.
1
9) Define <HR> Element with all of its attributes.
1
10)
Write any two features of XML.
1
11)
Write the output of the following codes:
4
i)
String str=Indian Idol;
JtextArea.setText(str.substring(1,5)+ +2000+12);
ii)
String x=Hello Students;
int len=x.length();
JtextArea.append(len++x.toUpperCase());
iii)
int value =Integer.parseInt(txt1.getText()+txt2.getText())
Value in txt1 is: 12
Value in txt2 is: 35
JOption1.showMessageDialog(null, +(value+1));
iv)
String sub=123;
JOptionPane.showMessageDialog(null, +sub.length()
+Integer.parseInt(sub));
12)
Define the use of Result set Class. Also write any two methods of it.
2
13)
Name & define in brief any two native class of Java. Also write one
method of each class.
2
14)
Write the HTML code to create the following list:
2
1. Metro Cities
Delhi
1
Mumbai
Chennai
Kolkata
2. Other Big Cities
Lucknow
Patna
Pune
Banglore
PTO
15)
16)
The following codes have some errors. Rewrite the corrected codes
underlining the correction made.2
int i,j=5;
i==j+5;
if(i=j)
{
Txt.getText(I and J are equal); }
17)
Name class containing following methods:
2
i)
Pow()
iv)
Concat()
ii)
getConnetion()
v)
CreateStatement()
iii)
parseInt()
vi)
showMessageDialog()
18)
19)
20)
Lbl.setText(east);
else if(ch==w)
Lbl.setText(west);
else if(ch==n)
Lbl.setText(north);
else if(ch==s)
Lbl.setText(south);
else
Lbl.setText(unknown);
21)
I)
Write a program to print the name of the Class Teacher using Option
Pane according to the class selected based on the following information:
3
2
Class
Name
XII A
XII B
XII C
XII D
Class Teacher
Mrs Sushma
Sharma
Mrs Kalpana
Kumari
Mr Jatin Kumar
Mr Harsh Bhatia