Objects or references which of them gets garbage collected?



Objects or references which of them gets garbage collected?..

Answer / Taruna Singh

In Java, both objects and references can be subject to garbage collection. However, only the reference itself is garbage collected, not the object it refers to.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Core Java Interview Questions

What are the topics in advance java?

1 Answers  


where lives in jvm

5 Answers  


What are the features of junit?

1 Answers  


Is java ee a framework?

1 Answers  


Does isempty check for null?

1 Answers  


Can we overload destructor in java?

1 Answers  


What is valid keyword in java?

1 Answers  


What is array in java?

1 Answers  


Can a constructor call the constructor of parent class?

1 Answers  


These static constructors are correct ? class A { statc intA() { } static A(int x,int y) { } static A(int x) { } }

1 Answers   HCL,


What is an example of character?

1 Answers  


What is integer valueof?

1 Answers  


Categories