Free Jobs
Reference


Java Questions: Core Java (182) J2EE (32) EJB (22) Servlet (33) JDBC (35) Hibernate (17) Struts (15) Swing (26) Oracle (12) JSP (36) Other (0)

Question: What is soft weak phantom and strong reference in java

To get the Posted Questions details daily in your mail Click Here

Share this question on Facebook/Twitter/Orkut Bookmark and Share





User: jennifer100 Post Date: 27 Feb 2012 07:00

Introduction:
What is soft weak phantom and strong reference in java



Answer:
  There are different types of references in java namely

  soft weak phantom and strong reference.

  from the garbage collectors perspective following is the difference between these references.

  A soft reference will be removed by garbage collector when memory is low.Used for caches.

  A weak reference will be removed by garbage collector in the next garbage collection  cycle.

  A Phantom reference will be removed by garbage collector but the memory will not be reclaimed

  A strong reference is not removed by garbage collector.





About Writer:
Hi,I am working as JAVA Team Lead in an MNC in Bangalore.


Writer's Link:

Writer's Email:







Comments:




Post Comment





Similar Questions Top QuestionsLatest Questions Other Questions by this Author







www.freejobsreference.com Copyright © 2009-2011 | All Rights Reserved
All content of this website is protected by copyright laws and should not be reproduced in any form or by any means without written permission
(Best viewed in IE 8.0+ or Firefox 3.0+ at resolution of 1024 * 768 or higher)