A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
Refactoring for Software Design Smells: Managing Technical Debt
this week in the
OO, Patterns, UML and Refactoring
Programmer Certification (SCJP/OCPJP)
GC (Kai's Notes)
Joined: Mar 11, 2002
May 11, 2002 21:18:00
Here is an example of something which resembles what I had...
at which line is the first
(myString) eligible for GC?
1.String myString = new String("Batman"); 2.String mySecond = new String("Robin"); 3.System.out.println(myString + mySecond); 4.myString = null; 5.myString = mySecond; 6. mySecond = null;
at line 4 is my answer.
[ Fixed [CODE] tags ]
[ May 12, 2002: Message edited by: Jessica Sant ]
Joined: Jul 03, 2001
May 12, 2002 02:11:00
SCJP2. Please Indent your code using UBB Code
I agree. Here's the link:
subject: GC (Kai's Notes)
eligible for GC()
when is eligible for garbage collection?
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015