This week's book giveaway is in the OCP forum.
We're giving away four copies of OCP Java SE 8 Programmer II Exam Study Guide and have Kathy Sierra, Bert Bates, & Elizabeth Robson on-line!
See this thread for details.
Win a copy of OCP Java SE 8 Programmer II Exam Study Guide this week in the OCP forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Reference Types in Java  RSS feed

 
Ranch Hand
Posts: 212
2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am going through multiple reference types (Weak, Phantom, Soft) in Java. Below is the URL:

http://javaconceptoftheday.com/types-of-references-in-java-strong-soft-weak-and-phantom/


I am unable to understand these reference types. Can anyone please explain these?
 
Marshal
Posts: 58414
178
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you been through the documentation for the Reference class and its three subclasses?
The concept behind the Reference class is really quite simple: if the Reference to an Object is the only way it is reachable, then it is eligible for garbage collection. The three subclasses make their references available for garbage collection under different circumstances. The package summary is probably also very helpful.
I think the link you gave us is quite clear; please tell us which parts of the links you don't understand.
 
Saloon Keeper
Posts: 8617
161
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I wrote some comprehensive explanations in this thread.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!