Exception

0.0(0)
Studied by 0 people
call kaiCall Kai
Locked
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/22

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 12:11 AM on 4/19/24
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai
Chat

No analytics yet

Send a link to your students to track their progress

23 Terms

1
New cards

Exception

Event that occurs during the execution of a program that disrupts the normal flow of instructions.

2
New cards

Exception Handling

The process used to change the normal flow of code execution if a specified exception occurs.

3
New cards

Checked Exceptions.

Exceptions that occur during compilation

4
New cards

ClassNotFoundException

The class is not found.

5
New cards

IllegalAccessException

Access to a class is denied.

6
New cards

InstantiationException

Attempt to create an object of an abstract class or an interface.

7
New cards

NoSuchMethodException

A requested method does not exist.

8
New cards

Unchecked Exceptions

Exceptions that occur during execution. These are also known as runtime exceptions.

9
New cards

ArithmeticException

Arithmetic error, such as an integer divided by 0

10
New cards

ArrayIndexOutOfBoundsException

Accessing an invalid index of the array

11
New cards

ArrayStoreException

Assigning a value to an array index that does not match the expected data type

12
New cards

InputMismatchException

Entering a value that does not match the expected data type

13
New cards

NullPointerException

Invalid use of a null reference

14
New cards

NumberFormatException

Invalid conversion of a string to a numeric format

15
New cards

StringIndexOutOfBoundsException

Accessing an invalid index (character) of a string

16
New cards

try block

A block of code that might throw an exception that can be handled by a matching catch


17
New cards

catch block

A segment of code that can handle an exception that might be thrown by the try block that precedes it.

18
New cards

getMessage()

Method can be used to determine Java’s message about the exception.

19
New cards

Syntax of getMessage ()

System.out.println(exceptionName.getMessage());

20
New cards

(1) try block

Is accepted in a program but there can be multiple catch blocks

21
New cards

User-defined exception

Created by extending the Exception class.

22
New cards

finally block

Statements which are executed whether or not an

23
New cards

throw statement

Sends an exception out of a block or a method so it can be handled elsewhere.