Hi, please guide what can be correct option..
class A{
public static void main(String args[]){
Object o = new Object(); //line 1
method(o); //not defined
o = null; // line 2
}
}
when will the object created at line 1 will be eligible for GC.
1. at line 2
2. it is not known to be sure.
I think it will be option 2.
Please help
Thanks !