Hi All,
I have doubt on this question
In the following code, which is the earliest statement, where the object originally held in e, may be garbage collected:
1: public class
Test {
2: public static void main (
String args []) {
3: Employee e = new Employee("Bob", 48);
4: e.calculatePay();
5: System.out.println(e.printDetails());
6: e = null;
7: e = new Employee("Denise", 36);
8: e.calculatePay();
9: System.out.println(e.printDetails());
10: }
11: }
answer : Line 7
Why its line 7 not line 6?
Thanks,
Ricky