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

difference between two string object

 
mohanasundaram muthukannan
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi greetings,



if string literals are identical, the compiler creates one String object for "Hello World" in the literal pool. It is then assigned to both str and str2. how refer str1 and str2 in string object?
what happened in memory ?

Please help me.

Advance Thanks.
Mohana sundaram.M








 
Darryl Burke
Bartender
Posts: 5148
11
Java Netbeans IDE Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is a Beginning Java section for beginners' questions, you know.
 
Rob Spoor
Sheriff
Pie
Posts: 20667
65
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Which is where I will move this thread.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic