• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

difference between two string object

 
mohanasundaram muthukannan
Ranch Hand
Posts: 35
  • 0
  • 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: 5115
11
Java Netbeans IDE Opera
  • 0
  • 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: 20372
44
Chrome Eclipse IDE Java Windows
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Which is where I will move this thread.
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic