Java - Online Test - Yes-no - javasearch.buggybread.com


Share

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

  Constructor

What is the problem with following code ?

public class Car extends Vehicle{
   int x;

   void Car(int y){
      x = 5;
   }

   void Car(){
      this(5);
   }
}
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

  constructor







comments powered by Disqus