code: private static int abs(int a) {
          if(a >= 0)
              return a;
          else if(a != Integer.MIN_VALUE)
              return -a;
          return Integer.MAX_VALUE;
      }
docs: A modified version of abs that always returns a non-negative value.
  Math.abs returns Integer.MIN_VALUE if a == Integer.MIN_VALUE and this
  method returns Integer.MAX_VALUE in that case.