当前位置:文档之家› DivideByZeroException

DivideByZeroException

// Definition of class DivideByZeroException.
// Used to throw an exception when a divide-by-zero is attempted.
public class DivideByZeroException
{
public static void main(String []args)
{
int b=0;
int a;
a=4/b;
System.out.println("a="+a);
int c;
c=b++;
System.out.println("c="+c);
}
}

相关主题
文本预览
相关文档 最新文档