Question: 1 . RuntimeException class is a subclass of the Exception class. Fill in the blanks to complete the declaration of the RuntimeException class. _____________ ________________

1 .RuntimeException class is a subclass of the Exception class. Fill in the blanks to complete the declaration of the RuntimeException class. _____________ ________________ _________________

.

.

.

3. RuntimeException is a subclass of Exception. The constructor RuntimeException(String message) calls the parent class's constructor with the message argument. Which of the following makes the call correctly?

this(message);

super(message);

super.Exception(message);

Exception(message);

4. RuntimeException has overloaded constructors: the 1-argument constructor RuntimeException(String message) and the 2-argument constructor RuntimeException(String message, Throwable cause).

The 2-argument constructor calls the 1argument constructor with message as the argument. Which of the following makes the call correctly?

this(message);

RuntimeException(message);

this.RuntimeException(message);

5. RuntimeException is a sublcass of Exception. Both classes have a constructor that takes a String argument. Among the statements below, indicate all that are syntactically correct.

Exception e = new Exception("Division by zero problem");

Exception e = new RuntimeException("Division by zero problem");

RuntimeException e = new Exception("Division by zero problem");

RuntimeException e = new RuntimeException("Division by zero problem");

6. Payable is an interface with one method payableAmount() that returns double.

(1) The source code of the interface is saved in a file named ____________java

(2) Fill in the blanks to complete code for the interface:

public ____________________ Payable {

public abstract _______________payableAmount();

}

7. The Student class implements the Payable interface without actually implementing the only payableAmount() method declared in the interface. Fill in the blanks to complete the declaration of the Student class:

public _________ class __________ ___________ __________

8. SQLException is unchecked exception, hence handling such exception is optional.

True

False

9. An abstract class can have constructors even though it cannot be instantiated.

True

False

10. In Java, a class can implement more than one interface.

True

False

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!