Java - Online Test - Finalize - javasearch.buggybread.com
OCJP / SCJP
New in Java 8
Java 8 Lambda
Java 8 java.time
Search Java Test Questions
223 test questions in repository.
Java - Test Questions on 'finalize' - 5 questions found
Which of the following methods are used by Java Garbage Collection Mechanism ?
All of the above
Which of the following is wrong for final instance variables ?
They cannot be changed after initialization
They can be initialized directly within static method
They can be declared and initialized together at the same place
They can be initialized within constructor
Which of the following is false for final ?
Final methods cannot be overriden
Final methods cannot be overloaded
Final classes cannot be subclassed
Final class cannot be abstract
Which of the following about Garbage collection is false ?
We can call Garbage collection explicitly
Garbage Collection guarantees that the application will not run out of memory
finalize method is used by Java for Garbage Collection
Garbage Collection Mechanism delete unclaimed objects that are no longer required
In which case finally won't get executed ?
in case of exception
in case of normal execution
in case of return statement before end of try block
in case of force program termination
comments powered by Disqus.
comments powered by