Online Training Spring Hibernate Training in Delhi R Programming Training Course Big Data and Hadoop Training Java Training  
 

Java reference

Ads

 
 

Share on Google+Share on Google+

neelam
Java reference
1 Answer(s)      6 years and 9 months ago
Posted in : Java Interview Questions
What is weak reference in Java?
Ads
View Answers

October 22, 2010 at 11:32 AM


Hi,

Here is the answer.

An object is weakly reachable when the garbage collector finds no strong or soft references but at least one path to the object with a weak reference.

A weak reference is one that does not prevent the referenced object from being garbage collected. Weakly reachable objects are finalized some time after their weak references have been cleared.

A weak reference is a reference that does not keep the object it refers to alive. A weak reference is not counted as a reference in garbage collection. If the object is not referred to elsewhere as well, it will be garbage collected.

Thanks.


Ads









Related Tutorials/Questions & Answers:
Java reference
Java reference  What is weak reference in Java
Is Java pass-by-reference?
Is Java pass-by-reference?  Is Java pass-by-reference
Advertisements
pass method reference in java
pass method reference in java  How to pass method reference in Java
Java interface reference
Java interface reference  When can an object reference be cast to an interface reference
Reference passing in java
Reference passing in java  plz tell me wat d meaning of refernce in java? for example : Class M(){ N n; } Class N(){ } wats dis meaning
Pass by Reference - Java Beginners
by Reference?can u please explain with examples.is java supports Pass by reference...); } } Java programming language does not pass objects by reference...(i); display(i); } } Pass By Reference: It refers to pass an object
difference between hashcode,reference in java
difference between hashcode,reference in java  difference between hashcode,reference in java
java pass by reference
java pass by reference  i understood java always pass arguments by pass by value so that the original value does not change...... but i want to know how we change the value and make it effect the original value by passing
java call by reference - Java Beginners
affect the caller?s original variables. Java never uses call by reference. Java...java call by reference  in java do we have ane term like call by reference. if yes give me the full description with example and if no then also
pass by value /reference - Java Beginners
pass by value /reference  hello sir/mam, i know pass by value is a primitive type in java. what about pass by reference in java ? .. For object type pass by value is used or pass by reference is used ? pls give me a example
reference
reference of student into person can do like this or any other alternative Student
Java simple reference source - Java Beginners
Java simple reference source  Hi, please could you recommend me a Java simple reference source (on line or e-book) where I could quickly find... would like to have a Java reference source for a quick look. I have got some
Reference type Vs Object type. - Java Beginners
Reference type Vs Object type.  Can anyone explain the exact difference between Reference and Object, how can i create a reference ? When exactly we have to use reference. Is this both terms interchangeble. Thanks
how do you parse by reference in java(with JGrasp)
how do you parse by reference in java(with JGrasp)  i am a 1st year beginner in java programming(GR 10) at hillcrest High School in south Africa My question is how do you parse by reference in java(with JGrasp) please help me i
difference between the obj and reference - Java Beginners
difference between the obj and reference  what is the difference between object and reference ? is there any difference
Version of reference>reference dependency
List of Version of reference>reference dependency
Reference Data Types
In this section we will discuss about Reference Data Types in Java 7
cross reference
cross reference   hi everbody as i got a problem and i have no idea the problem that i need to create a cross reference map for a Java source file. detail show below it mean that the input to the program is a Java source
by value or by reference
by value or by reference  Are objects passed by value or by reference
appdelegate reference
appdelegate reference  Hi, How to get the reference of appdelegate in my view controller class. Thanks.   Hello Friend, Following code example show how to get appdelegate reference anywhere in your iPhone/iPad
Java Reference Books
Java Reference Books      ....     Java Reference Guide In the Java Reference Guide this week I present an MXBean monitoring Servlet
pointer to a reference
pointer to a reference  pointer to a reference in C++    #include <iostream> using namespace std; void foo1(int& x) { int* p = &x; *p = 123; } void foo2(int* x) { int
pointer to a reference
pointer to a reference  pointer to a reference in C++    #include <iostream> using namespace std; void foo1(int& x) { int* p = &x; *p = 123; } void foo2(int* x) { int
Artifacts of reference
List of Artifacts of reference maven depenency
Reference Data Types
Data Types in brief In Java a reference data type is a variable that can... is called reference types in Java. The object becomes an instance when... are reference types because these are treated as objects in Java. For example
Are objects passed by value or by reference?
Are objects passed by value or by reference?  Are objects passed by value or by reference
call by reference - Development process
call by reference. Java always uses call by value. import java.awt.*; public...call by reference  Hello , Is thre callbyvalue in java... cannot change the caller?s reference variables, i.e. make them point to different
Maven Dependency reference >> 1.0
You should include the dependency code given in this page to add Maven Dependency of reference >> reference version1.0 in your project
Maven Dependency reference >> 1.0.1
You should include the dependency code given in this page to add Maven Dependency of reference >> reference version1.0.1 in your project
Maven Dependency reference >> 1.0.2
You should include the dependency code given in this page to add Maven Dependency of reference >> reference version1.0.2 in your project
Maven Dependency reference >> 20050206.203826
You should include the dependency code given in this page to add Maven Dependency of reference >> reference version20050206.203826 in your project