String s= new String("string");
for equals if there are in hierarchy will it be false ??
ok, we have two references but how many objects are created in the
"String Constant Pool" and how many on the "Heap"?
String Constant Pool : 1
Heap : 1
s2 ist placed on the stack and references directly the pool.
Originally posted by Ner min:
ok there was misunderstending of term "object", strictly in javatermms saying objects r really in the one and only place, the HEAP. I just mixed the "objects" and "objects representations"
Fire me boy! Cool, soothing, shameless self promotion:
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earthhttps://coderanch.com/t/751654/free-earth-friendly-heat-kickstarter