Browse by Topic

Popular

Latest

Latest Java Posts

Illustration of Java multi-catch exception handling with multiple exception types merging into a single catch block.
Java

Java Multi-Catch: Catch Multiple Exceptions Cleanly

Java multi-catch lets you handle multiple exception types in one catch block. See syntax, valid combinations, rethrowing, and when separate blocks are better.

exception handlingmulti-catchJava 7error handling
Illustration of Java multi-catch syntax showing multiple exception types separated by pipes in a single catch block
Java

Java Multiple Catch Blocks: Syntax and Use Cases

See how multi-catch works in Java, including the syntax, the exception hierarchy rule, and when separate catch blocks are clearer.

multi-catchexception handlingtry-catchJava 7
Diagram showing the Java exception hierarchy with RuntimeException highlighted as the base for unchecked exceptions.
Java

Java RuntimeException: Unchecked Exceptions Explained

This article explains Java RuntimeException, its role in the exception hierarchy, how to handle unchecked exceptions, and when to throw them.

Java exceptionsunchecked exceptionsexception handlingRuntimeException
Diagram showing the Java Throwable hierarchy with Exception and Error branches.
Java

Java Exception vs Error: Key Differences and Handling

java exception vs error: Understand the difference between Java exceptions and errors, how they relate to Throwable, and when to handle each in production code.

Java exceptionsError handlingThrowableChecked exceptions
Diagram of the Java exception hierarchy showing Throwable, Error, and Exception branches with checked and unchecked categories.
Java

Java Exception Hierarchy: Checked vs Unchecked

Understand the Java exception hierarchy from Throwable to custom exceptions, including checked and unchecked rules plus practical catching and API design guidance.

exception-handlingchecked-exceptionsunchecked-exceptionsthrowable
Illustration of the Java exception hierarchy showing checked exceptions enforced by the compiler and unchecked exceptions extending RuntimeException.
Java

Java Checked vs Unchecked Exception: Key Differences

java checked vs unchecked exception: Learn the compiler-enforced difference between checked and unchecked exceptions in Java and when to use each type for reliable err...

Java exceptionsChecked exceptionsRuntimeExceptionError handling
Illustration of a Java unchecked exception thrown at runtime, showing a stack trace and a catch block.
Java

Java Unchecked Exceptions: Handling Runtime Failures

Learn how Java unchecked exceptions differ from checked ones, when to catch them, and how to throw them responsibly in your own code.

unchecked exceptionsexception handlingJava runtimeNullPointerException
Diagram showing a Java method signature with a throws clause and a compiler enforcement symbol.
Java

Java Checked Exception: Syntax and Handling

Learn how Java checked exceptions work, how the compiler enforces handling, and when to use throws versus try-catch in real code.

checked exceptionsexception handlingthrows clausetry-catch
Diagram showing the difference between throw and throws in Java, with a method signature and an exception object being thrown.
Java

Java throw vs throws: Key Differences and Usage

java throw vs throws: Understand the difference between throw and throws in Java, when to use each, and how they affect exception handling in your code.

JavaException HandlingChecked ExceptionsThrow Statement
Java method signature with a throws clause declaring checked exceptions, symbolizing exception propagation in Java code.
Java

Java throws Keyword: Declaring Exceptions in Method Signatures

Learn how to use the Java throws keyword to declare checked exceptions in method signatures, propagate them to callers, and avoid common mistakes.

Java exceptionschecked exceptionsexception handlingmethod signature