This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

String literal pool

 
anish jain
Ranch Hand
Posts: 129
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 93
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Following link contains explanation:

http://www.coderanch.com/t/381045/java/java/String-Memory-Allocation
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic