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

q from abhilash mock exam on strings.

 
JayaSiji Gopal
Ranch Hand
Posts: 303
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
 
Barry Gaunt
Ranch Hand
Posts: 7729
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Read the API!
 
Colin Cullen
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For a deeper understanding to your puzzle check out:

JLS 3.10.5 String Literals

Or the excellent article on JavaRanch
The SCJP Tip Line -- Strings, Literally
by Corey McGlone

Enjoy!
 
Win jones
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


Print Not Equal - if the trim function does not have anything to trim then new strings are not created (remeber String is immuatable).
 
ankur rathi
Ranch Hand
Posts: 3830
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Colin please can you give URL for that article which is on java ranch .
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic