wood burning stoves 2.0*
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 The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript 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: 93
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