employer cover photo
employer logo
employer logo

Infinite Computer Solutions

Is this your company?

Infinite Computer Solutions interview question

What is difference between Throw vs throws?

Interview Answer

Anonymous

25 Mar 2022

throw The throw keyword in Java is used to explicitly throw an exception from a method or any block of code. We can throw either checked or unchecked exception. throws throws is a keyword in Java which is used in the signature of method to indicate that this method might throw one of the listed type exceptions. The caller to these methods has to handle the exception using a try-catch block.