neelam
Java reference
1 Answer(s)      2 years and 7 months ago
Posted in : Java Interview Questions

What is weak reference in Java?
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.









Related Pages:
Java reference
Java reference  What is weak reference in Java
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
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
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
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
Reference Data Types
In this section we will discuss about Reference Data Types in Java 7
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
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
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
JavaScript array object reference
JavaScript array object reference   ... that helps you in understanding JavaScript array object reference. For this we are using Java Scripting language. We declare an array variable that is used
With reference to the question " TELL US THE LOGIC OF DICEROLLER"???
With reference to the question " TELL US THE LOGIC OF DICEROLLER"???  Tell us the logic of diceroller 1 Answer(s) 18 minutes and 38 seconds ago Posted in : Java Beginners As told ""The (Math.random()*6)+1 returns the random
by value or by reference
by value or by reference  Are objects passed by value or by reference
Java Reference Books
Java Reference Books      ....     Java Reference Guide In the Java Reference Guide this week I present an MXBean monitoring Servlet
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
view jsp file (reference file). is the way of coding good ?
view jsp file (reference file). is the way of coding good ?  <%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> View Retailer <%@ page import="com.tcs.ilp.*" %>
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
Are objects passed by value or by reference?
Are objects passed by value or by reference?  Are objects passed by value or by reference
Declare Reference variable
Declare Reference variable   class A { int a; //instance... is shared. I just want to ask if we declare Reference variable above then what does...?? (Generally we used to declare reference variable in main method at the time
JSF core Tag Reference
JSF Core Tag Reference          This section is dedicated to make you understand about JSF Core Tags. All these core tags are contained in JSF Core Tag Library
Object reference not set to an instance of an object
Object reference not set to an instance of an object  Object reference not set to an instance of an object
Struts Reference
Struts Reference Welcome to the Jakarta Online Reference... Project. Here we are providing you detailed Struts Reference. This online struts reference covers Struts Model-View-Controller (MVC) concepts, configuring and using
XML error message: The reference to entity
XML error message: The reference to entity   XML error message: The reference to entity "ai" must end with the ';' delimiter. Im getting this error when i gotta edit my blogger template Please advice manjunath
PHP Call By Reference
PHP Call By Reference: In PHP we can pass reference of a variable, so that we... values from where we have sent. It is much like the call by reference, in which we... function. PHP Call By Reference Example: <?php function swap(&
Null reference error in javascript function?
Null reference error in javascript function?  Ã?° want to use this code but when the page opens, I get a null reference error. When I open the page a second time, this error doesn't occur. I understand when the site caches
RetDAO.java (part1) ..reference. Is this logic good?
RetDAO.java (part1) ..reference. Is this logic good?  public static int searchDelete(Connection conn,String ret_id) throws Exception { //System.out.println(ret_id); st=conn.createStatement
RetDAO.java (part1) ..reference. Is this logic good?
RetDAO.java (part1) ..reference. Is this logic good?  public static int searchDelete(Connection conn,String ret_id) throws Exception { //System.out.println(ret_id); st=conn.createStatement
The ref in Spring, Reference Injection
Reference Injection In the reference injection one bean definition is injected to another. For reference injection you use the constructor-arg or property... into the second bean definition by reference using the property element's ref
PHP Object Reference
that the terms object and reference is interchangeable. Now we must know what is actually an object and what is a reference. Whenever an object is instantiated... or identifier which refers to that memory chunk is called a reference. But in general
doubt about superclass reference and subclass object
doubt about superclass reference and subclass object  class superclass { p.bark() } class subclass extends superclass { p.bark } {p.s.v.m... that at compile time as reference variable is of superclass so compiler checks
login controller.servlet file.. (good coding stuff for reference)
login controller.servlet file.. (good coding stuff for reference)  package com.tcs.ilp.controller; import java.io.*; import java.util.*; import com.tcs.ilp.model.*; import java.sql.*; import java.io.IOException; import
login dao file for referece (source code for reference)
login dao file for referece (source code for reference)  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <
Method in Java
Method in Java       In this section, we will explore the concept of method in the reference of object...; Let's explore the things in detail: In java language there are some important
JavaScript - JavaScript Tutorial
of the best Quick reference to the JavaScript. In this JavaScript reference you will find most of the things about java script. JavaScript tutorial is classified... with the Java Scripting language. You will learn the benefits of using JavaScript
Java Language Specification
Java Language Specification       It is written by the inventors of the java technology, The Java Language Specification, III Edition is a technical reference for the Java 
write a program to demonstrate call by value and call by reference.(pass objects as parameters)
write a program to demonstrate call by value and call by reference.(pass objects as parameters)  write a program to demonstrate call by value and call by reference.(pass objects as parameters
L - Java Glossary
reference for the Java  language.     Java Layout... L - Java Glossary       Java Language Specification It is written by the inventors
java
java  why we pass reference as a parameter in any java method
RetController.java (do get) (my file for reference for a test.. IS LOGIC good Enough ?
RetController.java (do get) (my file for reference for a test.. IS LOGIC good Enough ?   try { Connection conn=Create_Connection.conOpen(); System.out.println(conn); String submit

Ask Questions?

If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.

Ask your questions, our development team will try to give answers to your questions.