Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

about String class  RSS feed

 
ramchander yshetti
Ranch Hand
Posts: 97
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hai,
would you please tell me about the difference between

String a="ramchander";

and
String s=new String("ramchander");
 
Jesper de Jong
Java Cowboy
Sheriff
Posts: 16026
87
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is a frequently asked question. You can find some answers in the following threads, where other people asked exactly the same question:

Look here
And here
More here
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!