Java - Online Test - Finally -


Search Java Test Questions

 223 test questions in repository.

Java - Test Questions on 'finally' - 5 questions found

Which of the following is not possible ?Core Java
try block followed by catch
try block followed by finally
try block followed by catch block and then finally
try block without catch or finally block

  exceptions  java  try-catch  finally

In which case finally won't get executed ?Core Java
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


Which of the following is wrong for final instance variables ?Core Java
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

  java  final  final variable  java keywords

Which of the following is false for final ?Core Java
Final methods cannot be overriden
Final methods cannot be overloaded
Final classes cannot be subclassed
Final class cannot be abstract

  java  final  java keyword

Which of the following methods are used by Java Garbage Collection Mechanism ?Core Java
All of the above

  garbage collection  finalize

comments powered by Disqus