This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

difference s between the references.  RSS feed

 
Sudhakar Reddy Kurakula
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Actually I heard that we have various types of refereces.

1)strong reference
2)soft reference
3)weak reference
4)phantom reference

could anybody please explain the differences and how the garbage collector uses this concept while reclaiming any unused object.

Cheers
Sudha
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
They are documented at http://java.sun.com/j2se/1.4.2/docs/api/java/lang/ref/package-summary.html
 
Ernest Friedman-Hill
author and iconoclast
Sheriff
Posts: 24217
38
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
OK, I'm starting to see a pattern here. Sudhakar Reddy Kurakula, I'm starting to suspect that you've got a list of interview or test questions that you're trying to get answers for. Stop it, please; we're happy to help people learn, but this isn't an "answer mill".
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!