Originally Posted by
spoon!
String a = new String("Java String");
String b = "Java String";
Both a and b are references. The references (a & b) live on the stack. The objects they reference are on the heap.
Indeed. What is the problem? Maybe I misrepresented what I was trying to convey. You also didn't answer nor refute my last post.