What is garbage collection in Java, and how can it be used ?

Answers were Sorted based on User's Feedback



What is garbage collection in Java, and how can it be used ?..

Answer / dhawal

garbage collection is process run thruogh out the java
programe ,when we class creation takes place after that we
have to instantiate that class ,if we can not gives refrence
to this object then that will be find out by garbage
collector and that will collect by garbage collector.

Is This Answer Correct ?    11 Yes 16 No

What is garbage collection in Java, and how can it be used ?..

Answer / subramanyam

IF an object is created for an class that object is not
used than the memory which is allocated to that objected to
be wasted ,the wastage of memory is called garbage
collection

Is This Answer Correct ?    3 Yes 12 No

Post New Answer

More Core Java Interview Questions

what should do when using multiple catch() block & what should never do for the same?

1 Answers  


Which is best ide for java?

0 Answers  


Can we declare the static variables and methods in an abstract class?

0 Answers  


Can we clone singleton object in java?

0 Answers  


What is the mapping mechanism used by java to identify IDL language?

0 Answers  






What is runtime polymorphism or dynamic method dispatch?

0 Answers  


Why is it called a string?

0 Answers  


Is there any way to find whether software installed in the system is registered by just providing the .exe file? I have tried the following code but its just displaying the directory structure in the registry. Here the code : package com.msi.intaller; import java.util.Iterator; import ca.beq.util.win32.registry.RegistryKey; import ca.beq.util.win32.registry.RootKey; public class RegistryFinder { public static void main(String... args) throws Exception { RegistryKey.initialize(RegistryFinder.class.getResource("jRe gistryKey.dll").getFile()); RegistryKey key = new RegistryKey(RootKey.HKLM, "Software\\ODBC"); for (Iterator<RegistryKey> subkeys = key.subkeys(); subkeys.hasNext();) { RegistryKey subkey = subkeys.next(); System.out.println(subkey.getName()); // You need to check here if there's anything which matches "Mozilla FireFox". } } }

0 Answers   Google,


What are daemon Threads in java?

0 Answers   Impetus,


How multi processing is achieved in JAVA?

5 Answers   BMC,


Explain wait(), notify() and notifyall() methods of object class ?

0 Answers  


Why is stringbuffer called mutable?

0 Answers  


Categories