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

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the types of casting?

600


Explain the difference between static and dynamic binding in java?

548


What is meant by data hiding/encapsulation?

577


Can a class have an interface?

557


How to print an arraylist in java?

504






Can you call a method on a null object?

567


How do you reverse sort in java?

508


Write a program to print all permutations of string?

682


What is meant by bytecode?

579


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 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". } } }

1354


Which is better stringbuilder or stringbuffer?

531


When should I use singleton?

524


Define a java class.

810


What is the size of string?

566


What is string builder in java?

558