File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
this week in the
Other Open Source APIs
String constant pool and heap
Joined: May 22, 2009
Jul 26, 2009 19:21:25
The following examples are from Kathy's book
// 1st example String s = "abc"; // creates one String object and one ref var // 2nd example String s = new String("abc"); // creates two objects and one ref var
Does JVM sets the
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?
Joined: Nov 24, 2005
Jul 26, 2009 22:00:00
Please don't duplicate threads. Continue the discussion
All roads lead to JavaRanch
I agree. Here's the link:
subject: String constant pool and heap
String Constant Pool
Problem with String and StringXxx objects
String Constant Pool - Help Needed
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015