Java
Check all ...
Site Language: English
Українська
English
Русский
Programming Tests
Login
Sign Up
Programming Tests
Theory
Snippets
Papers
Landing
Android
Prices
FAQ
Cosmo Story
Terms and Conditions
Privacy Policy
Cookies Policy
Send Feedback
Check all valid methods of creation of an Exception class.
Just declare a new class (which will inherit from Object)
Implement the Throwable interface
Extend the Throwable class
Extend the Catchable class
Extend the Exception class
Explanation
Exceptions must extend the
Throwable
class (which is not an interface). The
Throwable
class is a superclass (parent) of the
Exception
class, hence inheriting from any of them is a valid way of creating an exception class.
exceptions
Like
Login in
to like
Comment
Login in
to comment
Share
Tweet
Related Content
What will be the result of the compilation and execution of the following code? ...
What lines will the compilation error occur in: class M...
What will be the result of the following program compilation and execution? ...
Given the following code public class OverrideThrowsTes...
What will be printed to standard output stream if a tryThis() method throws an I...
What will be the result of the following code execution? ...
J
ava
Quiz
Login to learn Java
or
Read more about
Java Quizzes
Follow CodeGalaxy
Mobile Beta
Send Feedback
Keep exploring
Java quizzes
What will be printed out as a result of the following code execution / compilati...
What will be printed out as a result of the following code execution / compilati...
What will be printed out as a result of the following code execution / compilati...
What will be printed out as a result of the following code execution / compilati...
int i = Integer.MAX_VALUE + 10; What is th...
What happens after the following code is compiled and run: ...
Sign Up Now
or
Subscribe for future quizzes
Login in to like
Login in to comment