WEEK 1 - JAVA REVIEW AND EXCEPTION HANDLING Flashcards
1
Q
A class variable is what?
A
- Shared between all instances of the class
- Designated by the static keyword
- Exists independent of any instances
2
Q
Run time errors are thrown as what?
A
Exceptions.
3
Q
What is an exception?
A
An exception is an object that represents an error or condition that prevents execution from proceeding normally.
4
Q
What is an ArrayIndexOutOfBoundsException?
A
The exception that occurs when trying to access an array using an index that is out of bounds.
5
Q
What is an InputMismatchException?
A
The exception which occurs when the wrong data type is used.
6
Q
What can be used to detect and handle exceptions?
A
The try and catch statement.