0
How to take the minor symbol in a Java account
I was wondering how to remove the least ( - ) that gets when I make an account Example: double X = 10; double y = 5; double res = X - y; Result comes out like this: -10 How do I remove this -
3 Respuestas
+ 2
X - y (10 - 5) should yield 5.0. How can it be -10?
+ 1
Use Math.abs()
https://www.javatpoint.com/java-math-abs-method
0
Kkkkkk Account error, I made the account and did not even notice this detail