Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
    Bookmark Topic Watch Topic
  • New Topic

String constant pool and heap

 
Charles Chikito
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
  • Report post to moderator
The following examples are from Kathy's book



Does JVM sets the String constant pool within the heap or separately?

Which one does the ref var refers to in the 2nd example? The String object in the heap?

Tq
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Report post to moderator
Please don't duplicate threads. Continue the discussion there.
 
    Bookmark Topic Watch Topic
  • New Topic