1 / 4

Java Exception Handling and Its Useful Keywords

Exception handling is a process to handle exceptions in the execution of the program at run time so that the execution should not stop. Letu2019s get familiar with some useful keywords for Java exception handling.

BabyFlix
Download Presentation

Java Exception Handling and Its Useful Keywords

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Java Exception Handling and Its Useful Keywords

  2. Exception handling is a process to handle exceptions in the execution of the program at run time so that the execution should not stop. The advantage of exception handling is to maintain the execution of the program/code because generally, exception stops the execution of the program. Exception in Java are as below- 1.Checked Exception 2.Unchecked Exception

  3. Below are some Keywords that are used to handle exceptions In Java- 1.Try- It is a block of code where users write code that could have any exception. This block is always followed either by a catch block or finally block, we cannot use try block alone. 2.Catch- In this block code is written to handle the exception. Catch block is never written alone it is always preceded by the try block, and also catch block could be followed by a finally block. 3.Finally- This block of code is used to execute the crucial code of the program, it is executed when an exception is handled or not handled. 4.Throw- This keyword is used to throw the exception. 5.Throws- This keyword is used to declare the exception, it signifies that this method can throw an exception. We will always write this keyword with the method signature.

  4. A programmer should always handle the exception to maintain the normal execution of the program because an exception can disrupt the normal flow of the execution of the code that's why we should use exception handling. At Oodles ERP, we provide full-scale enterprise application development services to efficiently manage diverse business operations. Our custom mobile and web application development services are conducive to increasing business productivity and improving operational efficiency. For more information, contact us at erp@oodlestechnologies.com.

More Related