[Q] fast way to negate?



What's the fastest way to negate a number in Java?

int x = 1;
int negX *= -1;

What if "x" is already negative?

TIA!

Rob
.



Relevant Pages