

MCQOPTIONS
Saved Bookmarks
1. |
What is the output of below code snippet? double a = 0.02; double b = 0.03; double c = b - a; System.out.println(c); BigDecimal _a = new BigDecimal("0.02"); BigDecimal _b = new BigDecimal("0.03"); BigDecimal _c = b.subtract(_a); System.out.println(_c); |
A. | 0.009999999999999998 0.01 |
B. | 0.01 0.009999999999999998 |
C. | 0.01 0.01 |
D. | 0.009999999999999998 |
Answer» B. 0.01 0.009999999999999998 | |