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

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

or Read more about Java Quiz

Follow CodeGalaxy

Mobile Beta

Get it on Google Play
Send Feedback