• Post Reply Bookmark Topic Watch Topic
  • New Topic

String declarations  RSS feed

 
Ranch Hand
Posts: 44
Chrome Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
While browsing the internet, I found a question something like this:

Is there any difference between:

String s="ABC";

and

String s=new String("ABC");

Though both of them assign ABC to the identifier s, is there actually any difference in the way the assignment takes place. Please advice.
 
Rancher
Posts: 3742
16
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try browsing these forums instead of the whole internet and you will find the exact same question asked (and answered) many times.
 
Nelo Angelo
Ranch Hand
Posts: 44
Chrome Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Joanne Neal wrote:Try browsing these forums instead of the whole internet and you will find the exact same question asked (and answered) many times.


Thanks for the advice boss. Will do that.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!