In a catch statement, what does the following code do?
System.out.println(e.getMessage() ) ;
A) It prints the stack trace.
B) It prints the error message for an exception.
C) It prints the code that caused the exception.
D) It overrides the toString method.
Correct Answer:
Verified
Q10: The throws clause causes an exception to
Q15: When the code in a try block
Q25: The try statement may have an optional
Q33: In a multi-catch, (introduced in Java 7)
Q35: What will be the result of the
Q36: When an exception is thrown by code
Q37: Classes that inherit from the Error class
Q39: The catch clause:
A) follows the try clause
B)
Q40: If the IOData.dat file does not exist,
Q43: What will be the result of the
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents