Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

String Constant Pool - Help Needed

 
Sandeep Vaid
Ranch Hand
Posts: 392
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Where exactly is the string constant pool is created. Indside the heap or some memory in RAM. What does it contains ? Objects??? but Objects are always created on heap.

In Kathy's book : Chapter 6 Page ; 415,416,418 :

String s = "abc"; // Now the object "abc" gets created on heap...???What about String Pool in this case???
 
Rajesh Kadle
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This URL will answer your question.

String Literl Pool will be created on HEAP
 
Chandrasekar T
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
String Constant Pool is a part of heap which holds only the objects of String class.
 
Sandeep Vaid
Ranch Hand
Posts: 392
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic