August 4, 2025
Here's a clean and focused Java Exception Tree containing only the exceptions relevant to the Java certifications (like 1Z0-819, 1Z0-830), with a clear emphasis on:
- โ Runtime vs checked
- โ Certification usage context
- โ Avoiding noise from obscure exceptions
๐ง What to Know for Each (Certification-Relevant Exceptions)
- ๐ IOException โ Checked: File or stream operations, often used in try-with-resources.
- ๐ FileNotFoundException โ Checked: Thrown when attempting to open a non-existent file.
- ๐ค EOFException โ Checked: End of stream reached unexpectedly during input.
- ๐ฆ UncheckedIOException โ Unchecked: Wraps IOException in functional interfaces or streams.
- ๐ค InterruptedException โ Checked: Thrown when a thread is interrupted (e.g., during Thread.sleep()).
- โฑ๏ธ TimeoutException โ Checked: Occurs when waiting too long for a task to complete (e.g., Future.get() with timeout).
- ๐ฅ ExecutionException โ Checked: Wraps exceptions thrown in async tasks (e.g., from Future).
- ๐ InvocationTargetException โ Checked: Thrown when a reflected method throws an exception.
- ๐ IllegalAccessException โ Checked: Reflection access to a field/method is illegal.
- ๐งฑ InstantiationException โ Checked: Attempt to instantiate an abstract class or interface via reflection.
- ๐งญ NoSuchMethodException โ Checked: Requested method does not exist (common in reflection).
- ๐ MissingResourceException โ Unchecked: Missing key in a ResourceBundle.
- โ ArithmeticException โ Unchecked: Arithmetic error, like division by zero.
- โ NullPointerException โ Unchecked: Dereferencing a null reference.
- ๐ IndexOutOfBoundsException โ Unchecked: General out-of-bounds for collections/arrays.
- ๐งฎ ArrayIndexOutOfBoundsException โ Unchecked: Specifically for arrays.
- โ๏ธ StringIndexOutOfBoundsException โ Unchecked: Specifically for strings.
- ๐งช IllegalArgumentException โ Unchecked: Invalid method parameter passed.
- ๐ข NumberFormatException โ Unchecked: Failed conversion from string to number (e.g., "abc" to int).
- ๐ IllegalStateException โ Unchecked: Method invoked at an inappropriate time (e.g., reusing a closed stream).
- ๐ ClassCastException โ Unchecked: Invalid casting between incompatible types.
- ๐ซ UnsupportedOperationException โ Unchecked: Operation not supported, such as on unmodifiable collections.
- ๐ ConcurrentModificationException โ Unchecked: Modifying a collection during iteration.
- ๐ InputMismatchException โ Unchecked: Scanner receives input of unexpected type.
- ๐ญ NoSuchElementException โ Unchecked: Accessing elements from an exhausted iterator or empty optional/stream.
- ๐ก๏ธ SecurityException โ Unchecked: Access control violation (e.g., attempting a restricted operation).