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);
0.009999999999999998
0.01
0.01
0.009999999999999998
0.01
0.01
0.009999999999999998
0.009999999999999998
Quiz Recommendation System API Link - https://fresherbell-quiz-api.herokuapp.com/fresherbell_quiz_api
# | Quiz |
---|---|
1
Discuss
|
What is the output of this program?
Solution |
2
Discuss
|
What will be the output of the following Java code? - Increment / Decrement
Solution |
3
Discuss
|
What will be the output of the following Java code? - Area Of Circle
Solution |
4
Discuss
|
What is the range of byte data type in Java?
Solution |
5
Discuss
|
Which of these literals can be contained in float data type variable?
Solution |
6
Discuss
|
What will be the output of these statement?
Solution |
7
Discuss
|
Which one is a valid declaration of a boolean?
Solution |
8
Discuss
|
What is the numerical range of a char data type in Java?Which of these coding types is used for data type characters in Java?
Solution |
9
Discuss
|
Which of the following is the advantage of BigDecimal over double?
Solution |
10
Discuss
|
What is the output of this program?
Solution |
# | Quiz |
Copyright © 2020 Inovatik - All rights reserved