Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

String Object

 
Mr Iftikhar
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.)

 
Valentin Crettaz
Gold Digger
Sheriff
Posts: 7610
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Mr Iftikhar
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Valentin Crettaz.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic