//I think can can’t predict when the e will be eligible for the garbage collection since we
are not sure of what the method calculatepay() does. But in the Hun’t it is mentioned that after the line 8 it will be eligible for the garbage collection. What should be the right answer.
public class
Test {
public static void main (
String args []) {
Employee e = new Employee("Bob", 48);
e.calculatePay();
System.out.println(e.printDetails());
e = null;
e = new Employee("Denise", 36);
e.calculatePay();//8
System.out.println(e.printDetails());
}
}