Skip to main content

PROGRAM OF EXCEPTION Handling:



PROGRAM-
class ExceptionDemo1
 {
            public static void main(String args[ ])
            {
                        int a=Integer.parseInt(args[0]);
                        int b=Integer.parseInt(args[1]);
                        int c;
                        c=a/b;
                        System.out.println("c="+c);
            }
}

Comments

  1. this program will show you the exception when you take the value a=any integer and b=0 .

    ReplyDelete

Post a Comment