Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa Java-Beginners garbage collection
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


chandu
garbage collection
1 Answer(s)      6 years and 2 months ago
Posted in : Java Beginners



Advertisement
View Answers

August 25, 2008 at 11:27 AM


Hi friend,


An object in a program is not used for long time then it will be automatically deleted by the garbage collector.
It save the some amount of memory.It identifies the objects that are no longer used by a program.
A Java object is subject to garbage collection when it becomes unreachable to the program in which it is used.
System.gc() method may be used to call it explicitly It is controlled by the JVM ,
The JVM runs periodically by using "mark" and "sweep"algorithms.Instead of "destructor"
in c++ , java supports garbage collector.


For read more information :

http://www.roseindia.net/java/example/java/io/code-for-garbage-collection.shtml

Thanks


Related Tutorials/Questions & Answers:
garbage collection
garbage collection  how to use garbage collection in program using core java
Garbage collection
Garbage collection  why garbage collection? How it works?   Garbage collection is one of the most important features of Java. The purpose of garbage collection is to identify and discard objects that are no longer
Advertisements
Java garbage collection
Java garbage collection  What is Garbage Collection and how to call it explicitly
garbage collection in java
.style1 { color: #FFFFFF; } Garbage Collection in Java In java... through garbage collection. In other words it deallocate memory automatically which have no longer use. This technique is known as Garbage Collection
c++ garbage collection implementation
c++ garbage collection implementation  How to implement the garbage collection program in C
garbage collection - Java Beginners
object is subject to garbage collection when it becomes unreachable to the program...garbage collection  wat is the use of garbage collection  ... then it will be automatically deleted by the garbage collector. It save the some amount
garbage collection implementation dependent java
garbage collection implementation dependent java  How a garbage collection works in Java
Java garbage collection
Java garbage collection  Can an object be garbage collected while it is still reachable
Java garbage collection
Java garbage collection  How many times may an object's finalize() method be invoked by the garbage collector
php garbage collection sessions - PHP
php garbage collection sessions  i wanted to know more about the php garbage collection sessions.. how can i create and hold
Java garbage collection
Java garbage collection  Can an unreachable object become reachable again
What is garbage collection? - Java Beginners
What is garbage collection?   Hi, Tell me about garbage collection. How garbage collection works in java? Thanks   Garbage... Collection. The Garbage collection process is automatic and programmer can?t free
Java Garbage Collection
Java Garbage Collection      ... on garbage collection. The name "garbage collection" implies... but never freed explicitly by the code. Garbage collection is the process
Garbage collection process in java - Java Beginners
Garbage collection process in java  Name the process used for Garbage collection in Java? Thanks   Garbage collection process In Java the Garbage collection process is known as Garbage Collector. The Garbage
What is the purpose of garbage collection in Java, and when is it used?
What is the purpose of garbage collection in Java, and when is it used?  Hi, What is the purpose of garbage collection in Java, and when is it used... of Garbage collection in Java. so Please visit the link and clear your doubts
Garbage Collection
Garbage Collection      ... explicit Garbage Collection. Garbage Collection took 984 ms Staring explicit Garbage Collection. Garbage Collection took 16 ms
Code for Garbage Collection
Code for Garbage Collection  ... collection. First of all we have created an object for the garbage collector... the garbage collection on that object. Then we have used the System.currentTimeMillis
Java garbage collector
Java garbage collector  How you can force the garbage collection
Java garbage collector
Java garbage collector  Does garbage collection guarantee that a program will not run out of memory?  Hi, The Java Garbage Collector does not guarantee of this. Thanks
Garbage Collector
Garbage Collector  Hi, Can any one please tell me what are the types of garbage collector ?? Regards: Akash
Collection
Collection  What is the exact difference between lagacy classes and collection classes? and Enumeration is possible on Collection classes
collection
collection  As we know array holds the similar kind of elements, then in collection how toArray() method will convert the collection having different objects as elements to an array in java
collection
, Hashtable and Collections and Collection?   Enumeration : It is series... : It is re-sizable array implementation. Belongs to 'List' group in collection... Map in collection. Collections : It implements Polymorphic algorithms which
Collection
Collection  actually why do we need collections? means we can also store group of objects in relational data base and dbms also provides all the operatoins insert,delete,update,sort,search etc. then why collection
GARBAGE COLLECTOR
GARBAGE COLLECTOR  What is garbage collector in java?   In order to achieve run-time polymorphism in java following supports needed. At first overrides the super-class one or more methods in subclass this is due
garbage collector
garbage collector  Hi what is the adventage using system.gc() method ? what is the adventage f annotation in java ? how can we loads the spring...;Advantage of system.gc(): System.gc() runs the Garbage Collector.The JVM
Java garbage collector
Java garbage collector  What is the priority of Garbage collector thread
garbage collector - Java Interview Questions
garbage collector  what is the use of garbage collector?  ...; for (int i = 0; i < size; i++) { } System.out.println("Garbage Collection started explicitly."); long time = System.currentTimeMillis
Access Modifiers and Garbage Collection
Access Modifiers and Garbage Collection       Previously it was a requirement to allocate... step further in version 2.0 garbage collector is implemented as a conservative
Java garbage collector
Java garbage collector  Which is garbage collected first: Normal variables or static variables
Java Garbage collector
Java Garbage collector  What kind of thread is the Garbage collector thread?  Hi Friend, It is a daemon thread. Thanks
Advertisements
 

 

 

DMCA.com