By what default value is an object reference declared as an
instance variable?
Answer / pranab dutta
Its default value is ?null? unless we define it explicitly.
| Is This Answer Correct ? | 35 Yes | 2 No |
Explain how to convert any java object into byte array.
What does mean in regex?
What is immutable data?
What is the immediate superclass of Menu?
Are variables stored in ram?
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 life cycle of Thread ?
12 Answers HCL, Varnar Softech,
Can there be an abstract class with no abstract methods in it?
Difference between Choice and a List?
What is finally block?
What are the 7 types of characters?
1) Find the Merge point of two linked lists. 2) Swap two bits of integer. 3) Reverse individual words of the sentence. 4) Reverse string without using temp string.