What is garbage collection in Java, and how can it be used ?
Answers were Sorted based on User's Feedback
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 |
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 |
what should do when using multiple catch() block & what should never do for the same?
Which is best ide for java?
Can we declare the static variables and methods in an abstract class?
Can we clone singleton object in java?
What is the mapping mechanism used by java to identify IDL language?
What is runtime polymorphism or dynamic method dispatch?
Why is it called a string?
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". } } }
What are daemon Threads in java?
How multi processing is achieved in JAVA?
Explain wait(), notify() and notifyall() methods of object class ?
Why is stringbuffer called mutable?