I have a simple question, but i can't find a solution for it.
I want to use abs()
method, but it doesn't work. I'm always getting the error
Cannot find symbol: method abs(int)
I have already tried to use the method by including "import java.math"
above the code. But that doens't work too.
Call it as
Math.abs(number)
or import as:
import static java.lang.Math.abs;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With