Answer Posted / vijayakumar chinnasamy
Variable/object
1. is eligible for garbage collection when no object refers
to it.
2. Is eligible when its reference is set to null i.e
objName=null.
3. referred by method variables or local variables are
eligible for garbage collection when they go out of scope.
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
Can a main method be declared final?
What is the size of int in 64-bit jvm?
How do you reverse a string in java?
Can we use static class instead of singleton?
explain local datetime api in java8?
Where are the local variables stored?
What are the rules for naming an array?
Which class is the superclass for all the classes?
Write a program to print 15 random numbers using foreach of java 8?
What is the difference between state-based unit testing and interaction-based unit testing?
How is treeset implemented in java?
Can you make a constructor final?
What is t type java?
What is outofmemoryerror in java?
What is multithreading in java?