output is:Never in this program as until last refernce is null none of the objects is eligible and when last refernce is nulled all three are eleigible.
what is meant by last refernce.n xplain the output
That exercise looks familiar; please quote Your Source. And please use the code button to preserve indentation and legibility.
When you get to the end of the method, work out which object the e1 reference points to, then work out what all its fields are, and whether they have any references. Write it on a sheet of paper and that ought to explain your problem.