How is Garbage collection done in Java?
Answer Posted / boomiraj
Programmer can not cause the garbage collector.
We can call the garbage collection using System.gc();
And we can set the variable value equal to null, it assign that variable garbage rest the that use.
| Is This Answer Correct ? | 3 Yes | 1 No |
Post New Answer View All Answers
Can we convert list to set in java?
Why isn’t there operator overloading?
Can we compare two strings in java?
Can we convert stringbuilder to string in java?
How concurrent hashmap works?
What is a method type?
What advantage do java's layout managers provide over traditional windowing systems?
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
How to obtain a performance profile of java program
How to perform quicksort in java?
What is encapsulation in java?
What is file in java?
Explain treeset?
Where import statement is used in a java program?
Explain jvm, jre, and jdk?