This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Java in General and the fly likes String literal pool Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "String literal pool" Watch "String literal pool" New topic
Author

String literal pool

anish jain
Ranch Hand

Joined: Feb 03, 2010
Posts: 129
When we say String s="hello", then "hello" object will be created in heap.

I want to know if this object is created in heap with reference stored in the string literal pool. Is this right? or String literal pool is separate memory area outside heap?
john sal
Ranch Hand

Joined: Jul 30, 2010
Posts: 92
Following link contains explanation:

http://www.coderanch.com/t/381045/java/java/String-Memory-Allocation
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: String literal pool
 
Similar Threads
String difference
String literal comparisons - help!
Behaviour of + in case of String literals
BJO - String literal pool contains object ???
String pool