• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Question from Mock Exam on String

 
Ranch Hand
Posts: 413
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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).]
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic