Java Exception Handling
Static nested class
A static class i.e. created inside a class is called static nested class in java. It cannot access non-static data members and methods. It can…
Local Inner class
A class i.e. created inside a method is called local inner class in java. If you want to invoke the methods of local inner class,…
Custom Exception
If you are creating your own Exception that is known as custom exception or user-defined exception. Java custom exceptions are used to customize the exception…
Exception Handling with Method Overriding
There are many rules if we talk about methodoverriding with exception handling. The Rules are as follows: If the superclass method does not declare an…
Final vs Finally vs Finalize
There are many differences between final, finally and finalize. A list of differences between final, finally and finalize are given below: No. final finally finalize…
Throws keyword
The Java throws keyword is used to declare an exception. It gives an information to the programmer that there may occur an exception so it…
Exception propagation
An exception is first thrown from the top of the stack and if it is not caught, it drops down the call stack to the…
Throw keyword
The Java throw keyword is used to explicitly throw an exception. We can throw either checked or uncheked exception in java by throw keyword. The…
Finally block
Java finally block is a block that is used to execute important code such as closing connection, stream etc. Java finally block is always executed…
Nested try
The try block within a try block is known as nested try block in java. Why use nested try block Sometimes a situation may arise…