+ 1
JAVA Simple Calculator remove decimal places
Can anyone teach me how to remove decimal places if the answer is a whole number?
4 Antworten
+ 1
FOLLOW ME
You can convert the double value into a intvalue. int x = (int) y where y is your double variable. Then, printing x does not give decimal places (15000 instead of 15000.0).
+ 1
ill try . thanks for your help ❤️
0
great . thanks for your help