What are the two ways to create a thread?
No Answer is Posted For this Question
Be the First to Post Answer
How to declare objects of a class ?
0 Answers Akamai Technologies,
How do you write methodology?
What is a generic data type?
What is the synonym of string?
Why vector is used in java?
What are static initalizers in java ?
What is treeset in java?
What is the base class of all exception classes?
What is the difference(or similarity if there are some) between object and a variable?
What is instance synchronization?
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?
What is the advantage of preparedstatement over statement?