A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
RabbitMQ in Depth
this week in the
Programmer Certification (SCJP/OCPJP)
Another String object confusion
Joined: Sep 22, 2004
Nov 04, 2004 11:57:00
a = "test";
a = null;
String b = "test";
Line 1 creates a new string instance and then places it in the String pool. Is that correct?
Also does Line 3 recreate a new object or does it use the object that was placed in the String pool. I'm confused about the relation between the String pool and the heap.
[ November 04, 2004: Message edited by: Francis Palattao ]
SCJP 1.4 <br />SCWCD 1.4 (preparing)<br />SCBCD 1.3 (coming soon)
Joined: Dec 20, 2001
Nov 04, 2004 12:07:00
SCJP Tipline, etc.
Did you see how Paul
cut 87% off of his electric heat bill with 82 watts of micro heaters
subject: Another String object confusion
need help for a question
How many String objects have been created?
Yet another string pool doubt
Is Kathy&Bert book wrong? Or my understanding wrong?
String is created on pool?
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015