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.
Replies
You are reading an archived discussion.
Related Posts
hie friends im karthik pursuing ECE from JNTU hyd. im new on CE i`ve gone through the forum i found it very much informative and very useful for young engineers...
hey guys i need an idea for my techfest , any idea relating to cars or locomotives would be greatly appreciated . thanks
Hi all,
I am assigned a task to do a presentation on Ship's Alarm Control and Monitoring System (ACMS). The system should be a centralised system which integrates control and...
hiii friends
on 3rd march in pragati engineerring college erudite 10 is going to b held intrsted candiidates can be participate in pps,model exbhitions,poster presentations and many more events
strides.pragati.ac.in/Erudite.html...
Hey friends can you suggest some innovative project definition in Java for a stand-alone application..?