Shannon Anderson-Rush
Quiz by , created more than 1 year ago

AP Computer Science Quiz on Java Exception Errors, created by Shannon Anderson-Rush on 25/10/2018.

651
0
0
Shannon Anderson-Rush
Created by Shannon Anderson-Rush over 5 years ago
Close

Java Exception Errors

Question 1 of 4

1

Thrown when an exceptional arithmetic condition has occurred. For example, an integer "divide by zero" throws an instance of this class. is the type of error.

Drag and drop to complete the text.

    ArithmeticException
    NullPointerException
    ArrayIndexOutOfBoundsException
    ClassCastException

Explanation

Question 2 of 4

1

An Exception that can occur when you try to improperly convert a class from one type to another. is this type of exception.

Drag and drop to complete the text.

    ArithmeticException
    NullPointerException
    ArrayIndexOutOfBoundsException
    ClassCastException

Explanation

Question 3 of 4

1

Thrown to indicate that an array has been accessed with an illegal index. The index is either negative or greater than or equal to the size of the array. is this type of exception.

Drag and drop to complete the text.

    ArithmeticException
    ClassCastException
    ArrayIndexOutOfBoundsException
    NullPointerException

Explanation

Question 4 of 4

1

If you try to follow a null reference, you will get this error which tells you that there is no object to reference. is this type of exception.

Drag and drop to complete the text.

    NullPointerException
    ArrayIndexOutOfBoundsException
    ArithmeticException
    ClassCastException

Explanation