throw keyword in java

The ‘throw’ keyword is used to throw an exception explicitly. When a throw statement is encountered and executed, execution of the further code is stopped and returned to the caller. The throw statement takes a java.lang.Throwable as an argument. The Throwable is propagated up the call stack until it is caught by an appropriate catch […]

Share this article on