What is array class in java?
What is the difference between processes and threads?
What are different types of states exist for a thread?
How do you create a bulleted list?
Difference between a process and a program?
What are the ways in which a thread can enter the waiting state?
What is the purpose of a volatile variable?
public class Garbage { int a=0; public void add() { int c=10+20; System.out.println(c); System.out.println(a); } public static void main(String args[]) { Garbage obj=new Garbage(); System.gc(); System.out.println("Garbage Collected"); obj.add(); } } Above is a code in java used for garbage collection. object obj has been created for the class Garbage and system.gc method is called. Then using that object add method is called.System.gc method if called the obj should be garbage collected?
How many bytes are there?
What is the need of "creating and throwing an UserdefinedException" when the "Exception" class is already available?
How to access arraylist elements in java?
What does int argc char * argv [] mean?
Why do people says “java is robust”?