GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

GeekInterview.com  >  Interview Questions  >  J2EE  >  Java
Go To First  |  Previous Question  |  Next Question 
 Java  |  Question 912 of 923    Print  
phantom memory
what is phantom memory and how it is useful?


  
Total Answers and Comments: 1 Last Update: May 27, 2008     Asked by: almas 
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
May 26, 2008 23:42:45   #1  
rajamuthuramans Member Since: May 2008   Contribution: 2    

RE: phantom memory
A phantom reference lets you do final touch up closing on an object, even after it has been declared dead — no longer referenced by any live object.

Java has four orders of strength in holding onto Objects. In descending order from strongest to weakest they are:

1. The JVM holds onto regular Objects until they are no longer reachable by either  clients or any container. In other words Objects are garbage collected when there are no more live references to them. Dead references don’t count.

2. Soft references can be deleted from a container if the clients are no longer referencing them and memory is tight.

3. Weak references are automatically deleted from a container as soon clients stop referencing them.

4. Phantom references point to objects that are already dead and have been finalised.

 
Is this answer useful? Yes | No

 Related Questions

Garbage collection does not guarantee that a program will not run out of memory. It ispossible for programs to use up memory resources faster than they are garbage collected.It is also possible for programs 
Latest Answer : The object is eligible for garbage collection only if there is no strong reference to the object. An exception to this is island of references(where all objects point to each other).And you should never write your significant code in the object's finalise ...

How is it possible for two String objects with identical values not to be equalunder the == operator
The == operator compares two objects to determine if they are the same object inmemory. It is possible for two String objects to have the same value, but locatedindifferent areas of memory. 

Answered by Scott on 2005-05-12 09:50:36: An Exception can be caught and recovered: ArrayIndexOutOfBoundsException means you tried to access a position of an Array that does not exist - no big deal.  An 
Latest Answer : exception will give user friendly message which is defined in exception handling,whereas error message is standard given by oracle. ...

In RMI, is the server object first loaded into the memory and then the stub reference is sent to the client or a stub reference is directly sent to the client

Suppose server object is not loaded into the memory, and the client requests for it, what will happen

Garbage collection does not guarantee that a program will not run out of memory. It ispossible forprograms to use up memory resources faster than they are garbage collected. It is alsopossible forprograms 

The == operator compares two objects to determine if they are the same object inmemory. It is possible fortwo String objects to have the same value, but located indifferent areas of memory. 

The Java runtime environment deletes objects when it determines that they are no longer being used. This process is known as garbage collection. The Java runtime environment supports a garbage collector 

What's the difference between the == operator and the equals() method? What test does Object.equals() use, and why?
The == operator would be used, in an object sense, to see if the two objects were actually the same object. This operator looks at the actually memory address to see if it actually the same object. The 

How is it possible for two String objects with identical values not to be equal under the == operator?
The == operator compares two objects to determine if they are the same object in memory. It is possible for two String objects to have the same value, but located indifferent areas of memory. 


 Sponsored Links

 
Related Articles

Service Oriented Java Business Integration Review

Service Oriented Java Business Integration Review Introduction If you ve read through the texts which give you an introduction to SOA or Web Services you will often find them to be quite frustrating and the reason for this is because they spend too much time referencing business processes which are
 

C++ Memory Management operators

C Memory Management operators Need for Memory Management operators The concept of arrays has a block of memory reserved The disadvantage with the concept of arrays is that the programmer must know while programming the size of memory to be allocated in addition to the array size remaining constant m
 

Java and Client Server Models

Java and Client Server Models The Role of Client Servers on the Web Client server models provide the essential mechanisms for working with the Internet In fact most of the World Wide Web is built according to this paradigm In client server models the web browsers run by millions of users are the cli
 

The Interview Snafu

How to turn someone else’s mistake to your advantage Your dream job is about to become reality. A recruiter gave you the heads up about the perfect position at Humungous Conglomerate, Inc. You went through five interviews as well as a battery of psychological tests mandated by their HR de
 

Winning a Job Interview with a Winning Resume

Does your resume unlock your potential, take your skills to the highest level and win you the interview and the job you want now? The job market today is highly competitive and even if you think you have what it takes to get an interview you won’t get over the line without a polished, prof
 

Using UML with Java

Using UML with Java While Java is not a new language its application for the development of embedded systems is quite new Developers are beginning to take a second look at modeling languages such as UML and many feel it can be a powerful tool in their development arsenal mosgoogle center Introductio
 

Importance of Proper English during Job Interview

Importance of Proper English during Job Interview Your job interview is crucially important and it will determine whether or not you will get the job Depending on the type of job you re going for it is very important for you to use proper English In most cases jobs which offer higher salaries will h
 

Java Technology Trends

Technology Trends Involving Java Java is an object oriented programming language OOP for Web browsers It is organized around data rather than actions and supports polymorphism which allows the same code to be written generically so it can function with different datatypes inheritance which allows on
 

HR Interview - HR Interview Mistakes You Will Want To Avoid

HR Interview Mistakes You Will Want To Avoid The job interview can be a stressful process This is especially true for those who are going after a competitive position Your nonverbal communication combined with the answers you give during the interview will determine if you are hired mosgoogle While
 

HR Interview - Behavioral HR Interviews

Behavioral HR Interviews As the name implies a behavioral interview is an interview that is held by a human resources department to determine if an applicant has the behaviors that are appropriate for a job The company must know how an applicant will behave in a certain situations mosgoogle The logi
 





About Us  |   Privacy Policy  |   Terms and Conditions  |   Contact  |   Site Map  |   Add Question  |   Propose Category  |   RSS Feeds  |   Articles Sitemap  |   Site Updates  |   Add Resource

Copyright © 2005 - 2008 GeekInterview.com. All Rights Reserved
Page copy protected against web site content infringement by Copyscape