Program that intentionally causes a divide-by-zero error.

/* Program that intentionally causes a divide-by-zero error.*/

class ExceptionDemo1
{
    public static void main(String args[ ])
    {
        int i = 0;
        int j =500/i;
    }
}

0 comments:

Post a Comment

 
 
 
 


Copyright © 2012 http://codeprecisely.blogspot.com. All rights reserved |Term of Use and Policies|