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

Finally block

We know that whenever exception occurs, we need to handle such exception using try/catch But, If we miss to handle such exception then program terminates abruptly. This skips some of the important statements to be executed in the program. So, in such scenario, finally blocks comes to rescue us. All the statements or a piece […]

Share this article on
< Previous