Level 99 Level 101
Level 100

[No Typing] Exceptions

15 words 0 ignored

Ready to learn       Ready to review

Ignore words

Check the boxes below to ignore/unignore words, then click save at the bottom. Ignored words will never appear in any learning session.

All None

an exception
a problem that arises during the execution of a program
Checked exceptions
A checked exception is an exception that occurs at the compile time, these are also called as compile time exceptions
Unchecked exceptions
An Unchecked exception is an exception that occurs at the time of execution, these are also called as Runtime Exceptions
These are not exceptions at all, but problems that arise beyond the control of the user or the programmer
java.lang.Exception class
All exception classes are subtypes of the
public String getMessage()
Returns a detailed message about the exception that has occurred. This message is initialized in the Throwable constructor.
public Throwable getCause()
Returns the cause of the exception as represented by a Throwable object.
public String toString()
Returns the name of the class concatenated with the result of getMessage()
public void printStackTrace()
Prints the result of toString() along with the stack trace to System.err, the error output stream.
public Throwable fillInStackTrace()
Fills the stack trace of this Throwable object with the current stack trace, adding to any previous information in the stack trace.
the try and catch keywords.
A method catches an exception using a combination of
try{} catch(ExceptionName name){}
the syntax for using try/catch looks
A finally block of code
executes, irrespective of occurrence of an Exception.
JVM Exceptions
hese are exceptions/errors that are exclusively or logically thrown by the JVM. Examples : NullPointerException, ArrayIndexOutOfBoundsException, ClassCastException,
Programmatic exceptions
These exceptions are thrown explicitly by the application or the API programmers Examples: IllegalArgumentException, IllegalStateException.