What is a default constructor and also define copy contrucyor?
No Answer is Posted For this Question
Be the First to Post Answer
Can we have two main methods in a java class?
Why is core java important?
What modifiers are used for interface declaration?
Is java a virus?
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?
explain the life cycle of thread?
10 Answers CTS, NIIT, TCS,
Which collection is ordered in java?
Can a main method be overloaded?
Is string is a data type in java?
What do you mean by formatting?
What do you understand by a Static Variable?
difference between arraylist and linkedlist otherthan performance