• Post Reply Bookmark Topic Watch Topic
  • New Topic

ME-Q45(Mala Gupta)

 
Nil. Hatamova
Greenhorn
Posts: 29
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I need explanation for this question?
The answer is d,e
But i dont have any idea why ?
a At least two objects are garbage collected on line 1.
b At least one object is garbage collected on line 1.
c No objects are garbage collected on line 1
d The number of objects that are garbage collected on line 1 is unknown.
e At least two objects are eligible for garbage collection on line 2.
 
Roel De Nijs
Sheriff
Posts: 10763
148
AngularJS Chrome Eclipse IDE Hibernate Java jQuery MySQL Database Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Nil. Hatamova wrote:But i dont have any idea why ?

Have a look at this topic. It's about exactly the same code snippet. So carefully read this topic and if you still have questions/doubts let us know by clicking on the "Post Reply" button.

Hope it helps!
Kind regards,
Roel

 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!