Question 7.
How many
String objects are created when we run the following code.
String s1,s2,s3,s4;
s1 = "Hello";
s2 = s1;
s3 = s2 + "Pal";
s4 = s3;
A.1
B.2
C.3
D.4
Here only s1 and s3 are the String objects created still
correct answer is C not B
Can you discuss the reasoning behind it
Another one
Question 45.
To increase size of a button in a Frame with GridBag Layout manager as its Layout manager, which of the following best describes what you do.
A.We can't do any thing like this irrespective of the layout
policy of the container.
B.Use setFill method of GridBagLayout class.
C.Use setFill method of GridBagConstraints class
D.Use fill() method of GridBagLayout class.
There is no fill method given in jdk2.0 API
for GridBagLayout still answer given is D
what are your views about it ?
[This message has been edited by Gaurav Chikara (edited July 19, 2000).]