Sunday, February 25, 2018

Java program : Checked and Unchecked Exceptions

class CheckedException
{
    public static void main(String[] args) throws Exception
    {    Thread.sleep(3000);  //CHECKED exception
        System.out.println("Singh");
        System.out.println(10/0);    //UNCHECKED exception
        System.out.println("ashu");
    }


}

Thanks
Happy programming!

No comments:

Post a Comment

Class IX IT notes: Part A, Unit 1, Session 3.

 IT notes class 9 Part A Unit 1: COMMUNICATION SKILLS session 3: VISUAL AND WRITTEN METHODS OF COMMUNICATION Q1. What is Visual Communicatio...