Uttar Pradesh, India
Instagram

Exception Handling Keyword Summary in java

Java provides various keywords to handle exceptions that are summarized below.

1-try:
"The try keyword is used to handle risky(exceptional code)."

2-catch:

"The catch keyword is used to handle the exception handling code."

3-finally:

"The finally keyword is used for maintain resource clean up the code."

4-throw:

"The throw keyword is used to throw any type of exceptions explicitly."

5-throws:

"The throws keyword is used to handle checked exceptions only."


Comments

Share your thoughts in the comments

Your email address will not be published. Required fields are marked *