This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes String Object Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "String Object " Watch "String Object " New topic
Author

String Object

Mr Iftikhar
Ranch Hand

Joined: Oct 12, 2001
Posts: 39
Select the correct answer.
Which one method can change the String object.
1) toUpperCase()
2) concat()
3) charAt()
4) substring()
5) non of the above

Is there any method which can change the String object.
(But String is Immutable.)


java language
Valentin Crettaz
Gold Digger
Sheriff

Joined: Aug 26, 2001
Posts: 7610
you got it, no method can change the String object, thus the answer is 5.
HIH
------------------
Valentin Crettaz
Sun Certified Programmer for Java 2 Platform


SCJP 5, SCJD, SCBCD, SCWCD, SCDJWS, IBM XML
[Blog] [Blogroll] [My Reviews] My Linked In
Mr Iftikhar
Ranch Hand

Joined: Oct 12, 2001
Posts: 39
Thanks Valentin Crettaz.
 
wood burning stoves
 
subject: String Object