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
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Run time errors are thrown as what?

A

Exceptions.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is an exception?

A

An exception is an object that represents an error or condition that prevents execution from proceeding normally.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is an InputMismatchException?

A

The exception which occurs when the wrong data type is used.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What can be used to detect and handle exceptions?

A

The try and catch statement.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly