JavaDeploy
SiteMap
Java Certification
Java Beans
Java-OO Concepts
Java Exceptions
«Prev
Next»
Java Basics
System Object Model
Access Inheritance
Access Package
Extending Classes
Package Organization
Interface Role
Java Exceptions
Exceptions - Quiz
Catching Exceptions-Quiz
Finally-Keyword -Quiz
Throwing Exceptions - Quiz.
Catching Exceptions Baseball
Common Java Exceptions
Java Multitasking
Using Join for Threads
Starting JavaThread - Quiz
Coordinating Java Threads - Quiz
Thread States -Quiz
Java Input Output
Java IO Package
Data InputStream
JavaClass InputOutput Review
Java IO Quiz
Java User Defined Exceptions - Quiz
Each question is worth one point. Select the best answer or answers for each question.
1.
You can create a new Exception called BigException by writing
Please select the best answer.
A.
class BigException { }
B.
class BigException extends Exception implements Throwable { }
C.
class BigException extends Exception { }
2.
Imagine you are catching an exception called IOException and have assigned this exception to the variable
e
.
One way to display information about the exception in your catch block is to write this line of code
Please select the best answer.
A.
e.getMessage();
B.
System.out.println(e.getMessage());
C.
System.err.println(e.getMessage());
3.
You should never create and throw exceptions based on type
Please select the best answer.
A.
RuntimeException
B.
IOException
C.
Exception
Your score is 0.0
C
B
A
Submit
Quiz Explanation