Lecture Notes on Exception Handling and Debugging

0.0(0)
studied byStudied by 0 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/25

flashcard set

Earn XP

Description and Tags

Flashcards to help review key vocabulary and concepts related to exception handling and debugging techniques.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

26 Terms

1
New cards

Debugging

The process of identifying and rectifying errors in a program that leads to unexpected behavior.

2
New cards

Backtracking

A debugging technique where you start from the point the problem began and work backward through the code.

3
New cards

Binary Search

A debugging technique where code is divided into halves to systematically narrow the bug location.

4
New cards

Rubber Ducking

Explaining the problem to someone else (or even an inanimate object) articulates the problem out loud or written down forces critical thinking that can lead to discoveries of new insights and solutions.

5
New cards

Log Analysis

Placing these analysis statements in strategic areas of the code can help the debugger identify the issue.

6
New cards

Clustering Bugs

Group error reports into classes of related bugs as they often share common causes or patterns.

7
New cards

Exception

An unexpected or error condition encountered in programming.

8
New cards

Exception handling

Object-oriented techniques that manage or resolve errors.

9
New cards

Error Class

More serious errors that a program usually might not recover from.

10
New cards

Exception Class

Less serious errors that indicate unusual conditions that arise while a program is running and from which the program can recover.

11
New cards

Throwable class

The superclass for all errors and exceptions in the Java language.

12
New cards

IOException

The base class for exceptions thrown while accessing data from files, directories, and streams.

13
New cards

RuntimeException

Only detected during the execution of the application.

14
New cards

ArithmeticException

Raised whenever a wrong mathematical operation appears in the code during runtime.

15
New cards

IndexOutOfBoundsException

Thrown when an index used in arrays, lists, or strings is invalid.

16
New cards

ArrayIndexOutOfBoundsException

Indicates that an array has been accessed with an illegal index, either negative or greater than or equal to the size of the array.

17
New cards

NoSuchElementException

Indicates that the element being requested does not exist.

18
New cards

InputMismatchException

Occurs when the user does not provide the proper type of input or input is out of range.

19
New cards

VirtualMachineError

Indicates that the Java Virtual Machine is broken or has run out of resources necessary for it to continue operating.

20
New cards

OutOfMemoryError

Thrown when there is insufficient space to allocate an object.

21
New cards

InternalError

Indicates unexpected internal error has occurred in the Java Virtual Machine.

22
New cards

Stack trace history list / Stack trace

Shows each method called as the program ran after each attempted execution.

23
New cards

Try Block

The block of code a programmer attempts to execute while acknowledging that an exception might occur.

24
New cards

Catch Block

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

25
New cards

Throw Statement

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

26
New cards

Finally Block

Executes whether or not the preceding try block identifies an Exception.