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
What is ‘has a’’ relationship in java?
What is the significance of java packages?
What are constants and how to create constants in java?
Can we make constructors static?
What methods are used to get and set the text label displayed by a button object?
Explain the difference between private, public, package and protected in java?
Why is singleton not thread safe?
Explain a few methods of overloading best practices in java?
What is boolean query?
how a programmer confirms that the data submitted has been succesfully inserted into the database(either oracle or my sql).. How a programmer confirm if there is any problem with the program he wrote for insertion... ANS:--- >executeupdate method is having boolean return type, if anything goes wrong in data insertion or data updation, it would return false. otherwise, if it successfully inserts data into the database, it would return true NOW HOW TO I CHECK IN MY DURING EXECUTION WHETHER IT RETURNS TRUE OR FALSE... WELL IT WILL DISPLAY ANY MESSAGE OR NOT
Explain about data types?
What about main() method in java ?
How do you differentiate abstract class from interface?
What does nextint () do in java?
How can we break singleton in java?