What Java method takes an int
and returns +1 or -1? The criteria for this is whether or not the int
is positive or negative. I looked through the documentation but I'm bad at reading it and I can't find it. I know I've seen it somewhere though.
Integer.signum(int i)
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