This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
    Bookmark Topic Watch Topic
  • New Topic

string object

 
arivu mathi
Ranch Hand
Posts: 38
  • 0
  • Mark post as helpful
  • send pies
  • Report post to moderator
String s = new String("abc");
String s = "abc";

will the above two statements create a new string object?
what is the difference between the two statements?
 
Shaan Shar
Ranch Hand
Posts: 1249
Java Spring Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Report post to moderator
Originally posted by arivu mathi:
String s = new String("abc");
String s = "abc";

will the above two statements create a new string object?
what is the difference between the two statements?


I am sure that you haven't visited JAVA Ranch Properly...

Check this out..
Strings, Literally- JAVA Ranch.

This link will be usefull for you...

For more check out this also..

Java Beginners Faq
 
Barry Gaunt
Ranch Hand
Posts: 7729
  • 0
  • Mark post as helpful
  • send pies
  • Report post to moderator
We seem to be having a leetle problem with the bulletin board at the moment. I'm closing this one for now - it looks like a double post but it is not intentional.
 
I agree. Here's the link: http://aspose.com/file-tools
    Bookmark Topic Watch Topic
  • New Topic