• Post Reply Bookmark Topic Watch Topic
  • New Topic

How many Objects are created and how many are eligible for GC.  RSS feed

 
kavitha vakiti
Greenhorn
Posts: 10
Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,


regarding this program I read this thread (http://www.coderanch.com/t/642703/ocajp/certification/Garbage-Collector) given by Roel De Nijs.
I understand 4 objects are created and c1 is eligible for GC. how come 2 objects are eligible for GC. am unable to figure it out please suggest me

Thank you in Advance.
 
Campbell Ritchie
Marshal
Posts: 56578
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What about the Short field?
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!