employer cover photo
employer logo
employer logo

Infinite Computer Solutions

Est-ce votre entreprise ?

Question d’entretien chez Infinite Computer Solutions

What is difference between Throw vs throws?

Réponse à la question d'entretien

Utilisateur anonyme

25 mars 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.