Ordo Ordo - 8 months ago 34
Java Question

Using abs () method in java. My compiler doesn't know the method

I have a simple question, but i can't find a solution for it.

I want to use

the 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.


Are you using:


or just



Use Math.abs()