Java for beginners – Chapter 26 : Exception handling(try, catch, finally, throw and throws) Part – 1

Java

Video is ready, Click Here to View ×


Exception handling in Java (try, catch, finally, throw and throws):
What is Exception ?
Advantage of Exception handling.
Exception Handling keywords.

Exception Handling :
Exception is an event that disrupts the normal flow of the program.
Exception handling is a mechanism to handle runtime errors.
Advantages of using exception handling :
To maintain the normal flow of the application.

Java Exception Handling Keywords :
try.
catch.
finally.
throw.
throws.

try-catch block :
It is…

2 thoughts on “Java for beginners – Chapter 26 : Exception handling(try, catch, finally, throw and throws) Part – 1

  1. public class JavaSample {
    public static void main(String[] args){
    int data = 0;
    try{
    data = 40/0;
    }catch(Exception e){
    System.out.println("Don't divide by zero");
    }
    System.out.println("Program won't stop running");

    }
    }

Leave a Reply

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