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
Does throw expression have a result type in Scala?...
Is it required to catch checked exceptions in Scala?...
What will be printed out as the result of the following code execution? ...
Select a good (preferred) way to catch Exceptions in Scala:...
J
ava
Quiz
Login to learn Java
or
Read more about
Java Quizzes
Follow CodeGalaxy
Mobile Beta
Send Feedback
Keep exploring
Java quizzes
Which character do you use instead of " * " for importing all the names of a pac...
How would you change declaration of function foo to ensure that a functi...
What is the largest Tuple that Scala supports?...
Can methods, taking one argument, be used with infix syntax?...
What is a higher-order function?...
Scala's Unit roughly corresponds to which Java type?...
Sign Up Now
or
Subscribe for future quizzes
Login in to like
Login in to comment