Hint: Some useful methods

Recall that Math.abs will give you the absolute value.

The method for getting the sign of a value is Integer.signum.


Cary Gray
Last modified: Tue Mar 1 07:41:48 CST 2011