Java - Online Test - Yes-no -


Search Java Test Questions

 223 test questions in repository.

Java - Test Questions on 'Yes-no' - 3 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

What is a default constructor ?Core Java
Constructor without parameters declared by user
Constructor provided by Java if no constructor is declared
Constructor with empty body
All of the above


What is the problem with following code ?

public class Car extends Vehicle{
   int x;

   void Car(int y){
      x = 5;

   void Car(){
Core Java
We cannot use this() within normal method
We cannot chain methods
We cannot overload constructors
We cannot use return type void with overloaded methods


comments powered by Disqus