Home / Tag Archives: Exception Handling

Tag Archives: Exception Handling

Exception Handling In Java

Exception Handling is the mechanism to handle runtime malfunctions. We need to handle such exceptions to prevent abrupt termination of program. The term exception means exceptional condition, it is a …

Read More »

Exception Handling Mechanism

n java, exception handling is done using five keywords, try catch throw throws finally Exception handling is done by transferring the execution of a program to an appropriate exception handler …

Read More »

Try with Resource Statement

JDK 7 introduces a new version of try statement known as try-with-resources statement. This feature add another way to exception handling with resources management,it is also referred to as automatic …

Read More »

throw Keyword in java

throw keyword is used to throw an exception explicitly. Only object of Throwable class or its sub classes can be thrown. Program execution stops on encountering throw statement, and the …

Read More »

User defined Exception subclass

You can also create your own exception sub class simply by extending java Exception class. You can define a constructor for your Exception sub class (not compulsory) and you can …

Read More »

Method Overriding with Exception Handling

There are few things to remember when overriding a method with exception handling. If super class method does not declare any exception, then sub class overriden method cannot declare checked …

Read More »

Chained Exception

Chained Exception was added to Java in JDK 1.4. This feature allow you to relate one exception with another exception, i.e one exception describes cause of another exception. For example, …

Read More »

Exception Handling

Chained Exception was added to Java in JDK 1.4. This feature allow you to relate one exception with another exception, i.e one exception describes cause of another exception. For example, …

Read More »