This week's book giveaway is in the Agile forum.
We're giving away four copies of The Software Craftsman and have Sandro Mancuso on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes difference between two string object Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Software Craftsman this week in the Agile forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "difference between two string object" Watch "difference between two string object" New topic
Author

difference between two string object

mohanasundaram muthukannan
Ranch Hand

Joined: May 29, 2008
Posts: 35
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

Joined: May 03, 2008
Posts: 4813
    
    6

There is a Beginning Java section for beginners' questions, you know.


luck, db
There are no new questions, but there may be new answers.
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19958
    
  25

Which is where I will move this thread.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6 - OCEJPAD 6
How To Ask Questions How To Answer Questions
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: difference between two string object