| 150+ Multi-Threading & Exception Handling Blueprints 2026
CS 204: Advanced Java Programming & Concurrency Prep with Detailed Rationales
*Course Code:* CS 204
*Course Name:* Core Java Fundamentals & Advanced Concurrency
*Topic:* Multi-Threading, Concurrency, and Exception Handling Blueprints
*Academic Year:* 2026/2027
---
📋 STUDY CORE TOPICS OUTLINE
* Java Exception Hierarchy & Classification: Distinction between `Throwable`, `Error`,
`Exception`, checked exceptions, and unchecked (`RuntimeException`) exceptions.
* Exception Handling Syntax & Resource Management: Mechanics of `try-catch-
finally`, multi-catch blocks, exception rethrowing, suppressed exceptions, and
`AutoCloseable` with `try-with-resources`.
* Thread Fundamentals & Execution Lifecycle: Creating threads via `Runnable`,
`Callable`, and `Thread`, understanding thread states (`NEW`, `RUNNABLE`,
`BLOCKED`, `WAITING`, `TIMED_WAITING`, `TERMINATED`), and handling thread
interruptions.
* Synchronization & Explicit Locks: Mutex locks, `ReentrantLock`, `Condition` objects,
`synchronized` blocks/methods, memory visibility via `volatile`, and intrinsic object
monitors.
* Atomic Variables & High-Performance Concurrency: CAS (Compare-And-Swap)
operations, `AtomicInteger`, `LongAdder`, `VarHandle`, and lock-free concurrency
algorithms.
* Executor Framework & Thread Pools: `ExecutorService`, `ThreadPoolExecutor`,
custom thread factory configurations, rejection policies, and execution scheduling.
* Concurrent Collections & Task Decomposition: `ConcurrentHashMap`,
`CopyOnWriteArrayList`, `BlockingQueue` implementations, `ForkJoinPool`, and parallel
processing.
* Asynchronous Programming with CompletableFuture: Reactive task chaining,
combining asynchronous pipelines, exception handling in async workflows, and custom
executor completion.
,---
📚 TEXTBOOK ALIGNMENT INDEX
| Part Section | Coverage Focus | Question Range |
| :--- | :--- | :--- |
| Part 1: Core Exception Handling Architecture | Exception Hierarchy, Checked vs.
Unchecked, Throwing & Catching Exceptions | Questions 1 – 30 |
| Part 2: Advanced Exception Chaining & Resource Management | `try-with-
resources`, Suppressed Exceptions, Stack Traces, and Logging API | Questions 31 – 60
|
| Part 3: Fundamental Threading & Concurrent Execution | Thread Lifecycle,
Interrupts, Priorities, `Runnable`, `Callable`, and Daemon Threads | Questions 61 – 90 |
| Part 4: Synchronization & Lock Primitive Mechanics | `synchronized`,
`ReentrantLock`, `Condition` Variables, Memory Barriers, and `volatile` | Questions 91 –
120 |
| Part 5: High-Level Concurrency Utilities & Async Workflows | Atomic Objects,
Thread Pools, `ConcurrentHashMap`, `ForkJoinPool`, `CompletableFuture` | Questions
121 – 150 |
---
#### Question 1
In Java's exception hierarchy, which class serves as the ultimate superclass for all
objects that can be thrown using the `throw` statement or caught within a `catch`
block?
A. `java.lang.Exception`
B. `java.lang.Throwable`
C. `java.lang.RuntimeException`
D. `java.lang.Error`
*CORRECT ANSWER:* B. `java.lang.Throwable`
*RATIONALE:* In Java, `java.lang.Throwable` is the direct root of the exception
hierarchy. Only instances of `Throwable` (or its sub-classes) can be thrown by the Java
Virtual Machine or by the Java `throw` statement. Option A is incorrect because
`Exception` inherits from `Throwable`. Option C is incorrect because `RuntimeException`
is a subclass of `Exception`. Option D is incorrect because `Error` is a sibling of
`Exception`, both inheriting directly from `Throwable`.
,---
#### Question 2
When implementing robust error handling for file input/output operations, which of the
following represents an unchecked exception (`RuntimeException`) that does not
require mandatory declaration in a method's `throws` clause?
A. `java.io.FileNotFoundException`
B. `java.io.IOException`
C. `java.lang.NullPointerException`
D. `java.io.EOFException`
*CORRECT ANSWER:* C. `java.lang.NullPointerException`
*RATIONALE:* `NullPointerException` is a direct subclass of `RuntimeException`,
making it an unchecked exception. Unchecked exceptions represent logical bugs or
dynamic runtime failures that the compiler does not require you to explicitly catch or
declare in a `throws` clause. Options A, B, and D (`FileNotFoundException`,
`IOException`, and `EOFException`) are checked exceptions inheriting directly or
indirectly from `java.lang.Exception` without deriving from `RuntimeException`.
---
#### Question 3
Consider a method that reads system configuration parameters. If a
`RuntimeException` is thrown within the method execution and is not caught, what
immediately happens to the executing thread?
A. The JVM suppresses the exception and continues execution at the next statement.
B. The exception is converted into an `Error` and passed to the main operating system
process.
C. The thread terminates its execution after unwinding the call stack and printing an
uncaught exception trace to `System.err`.
D. The compiler injects a default catch block that restarts the thread automatically.
*CORRECT ANSWER:* C. The thread terminates its execution after unwinding the
call stack and printing an uncaught exception trace to `System.err`.
*RATIONALE:* Uncaught unchecked exceptions cause the current thread to
unwind its call stack. If no handler is encountered up to the root of the thread's call stack,
the thread's `UncaughtExceptionHandler` is invoked, printing the stack trace to
, `System.err`, and the thread dies. Option A is false because runtime exceptions are not
ignored. Option B is incorrect because exception types are not converted to `Error`.
Option D is false because runtime code cannot be auto-injected by the compiler at
runtime.
---
#### Question 4
When designing custom domain exception hierarchies in high-reliability Java enterprise
architecture, why is it recommended to derive custom domain exceptions from
`java.lang.Exception` rather than `java.lang.RuntimeException` for recoverable
failures?
A. Extending `Exception` forces calling methods to explicitly handle or declare the
exception, ensuring recoverable errors are not silently ignored.
B. `RuntimeException` subclasses cannot store contextual data or custom error fields.
C. `Exception` guarantees atomic memory rollbacks when thrown inside transactional
methods.
D. `RuntimeException` causes immediate JVM process termination regardless of `catch`
blocks.
*CORRECT ANSWER:* A. Extending `Exception` forces calling methods to explicitly
handle or declare the exception, ensuring recoverable errors are not silently ignored.
*RATIONALE:* Checked exceptions (subclasses of `Exception` that do not extend
`RuntimeException`) enforce compile-time checks requiring caller code to either handle
the failure via `catch` or declare it via `throws`. Option B is false because any class
extending `Throwable` can contain fields and methods. Option C is false because
exceptions do not inherently perform database or memory transaction rollbacks without
framework-level intervention. Option D is false because `RuntimeException` can be
caught normally with `catch (RuntimeException e)`.
---
#### Question 5
Which of the following classes directly inherits from `java.lang.Throwable` alongside
`java.lang.Exception` to represent serious structural problems in the underlying JVM
runtime environment?
A. `java.lang.RuntimeException`
B. `java.lang.VirtualMachineError`
C. `java.lang.Error`