How may objects will be eligible for GC just before the method returns?
public void compute(Object p)
{
Object a = new Object();
int x = 100;
String str = "abc";
}
the answer give is 1(i.e object a)
my doubt is str also a another object, so the answer will be 2. am i correct.