Meaningless Drivel is fun!*
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 Android Security Essentials Live Lessons this week in the Android 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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: String Object
 
Similar Threads
objects r passed by references
String & StringBuffer -- Difference
pass or copy by reference
reading integer from a file
How to find and replace a substring from a given string