What will be the result of compilation of the following code:

double big = 1.0e307 * 2000 / 2000;
System.out.println( big == 1.0e307 );
Explanation
The value of variable big will never become exactly 1.0e307 because of accuracy problems in floating-point operations.

Слідкуй за CodeGalaxy

Мобільний додаток Beta

Get it on Google Play
Зворотній Зв’язок
Продовжуйте вивчати
тести з Java
Cosmo
Зареєструйся Зараз
або Підпишись на майбутні тести