Java Query
Hi ,
----------------------------------------------
Given:-
class CB
{
Short st=200;
CB go(CB cb)
{
cb=null;
return cb;
}
public static void main(String[] ar)
{
CB c1=new CB();
CB c2=new CB();
CB c3=c1.go(c2);
c1=null;
// dostuff
}
}
------------------------------------------
Q. When //dostuff is reached,how amny objects are eligible for Garbage Collection?
please explain.
----------------------------------------------
Given:-
class CB
{
Short st=200;
CB go(CB cb)
{
cb=null;
return cb;
}
public static void main(String[] ar)
{
CB c1=new CB();
CB c2=new CB();
CB c3=c1.go(c2);
c1=null;
// dostuff
}
}
------------------------------------------
Q. When //dostuff is reached,how amny objects are eligible for Garbage Collection?
please explain.
0