int x = 7/0;
System.out.println(x);
int y = 0;
int z = 7/y;
System.out.println(z);
When the inevitable runtime error occurs, it appears as an ArithmeticException; there is no such thing as DivideByZeroException.
"But who would take the time to compile a book of C++ puns?"
int x = 7/0;
System.out.println(x);
int y = 0;
int z = 7/y;
System.out.println(z);
No comments:
Post a Comment