Multiple catch block

In Exception-Handling-try-catch article, we have seen how to handle single exception using try/catch block Now in this article, we will see how to handle multiple exceptions Whenever we handle multiple exceptions, order of catch block is very important. Let’s understand with an example class MultipleExceptionHandling{    public static void main(String args[]){       try{ […]

Share this article on

throw vs throws in java

Before going through this article, Please understand basics of throw and throws from my previous articles “throw” and “throws”. Let’s understand the difference between throw and throws “throw” keyword is used to throw an exception explicitly “throws” clause is used to declare an exception It means whenever we want to throw an exception in the […]

Share this article on
< Previous Next >