System.out.println(2.0 % 0);// NaN
System.out.println(0.0 % 0);// NaN
System.out.println(2.0 / 0);// Infinity
System.out.println(0.0 / 0);// NaN
System.out.println(Math.sqrt(-1)); // NaN
System.out.println( 0.0/0 );// NaN
System.out.println(2 / 0);// Ошибка выполнения - RuntimeError
Exception in thread "main" java.lang.ArithmeticException: / by zero
System.out.println(0.0 % 0);// NaN
System.out.println(2.0 / 0);// Infinity
System.out.println(0.0 / 0);// NaN
System.out.println(Math.sqrt(-1)); // NaN
System.out.println( 0.0/0 );// NaN
System.out.println(2 / 0);// Ошибка выполнения - RuntimeError
Exception in thread "main" java.lang.ArithmeticException: / by zero
Комментариев нет:
Отправить комментарий