RuntimeExceptions Flashcards

1
Q

Thrown when an arithmetic error occurs, such as when attempting to divide by zero.

A

ArithmeticException

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

Thrown for an attempt to write beyond a buffers limits.

A

BufferOverflowException, BufferUnderflowException

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

Thrown when an attempt is made to cast between incompatible types, such as String to Integer.

A

ClassCastException

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

Thrown when an attempt is made to create an array of negative size.

A

NegativeArraySizeException

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

Thrown when an attempt is made to use the nextElement() method on an Enumeration when no more values exist to access.

A

NoSuchElementException

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

When an attempt is made to use a method or access a field on a null reference.

A

NullPointerException

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

Thrown when an attempt is made to apply an operation that is not supported or that does not exist ( for example, attempting to write to a read only file system will result in throwing a ReadOnlyFileSystemException, which is a derived class of this exception.)

A

UnsupportedOperationException

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

Thrown when an incorrect or inappropriate argument is passed to a method.

A

IllegalArgumentException

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

Thrown when an attempt is made to access a data structure using an index value that is not within the permissible range; base class of ArrayIndexOutOfBoundsException and StringIndexOutOfBoundsException

A

IndexOutOfBoundsException

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