private String tryToInvert(String maybeNumber){
  if (!maybeNumber.isEmpty()) {
    return Integer.toString(Integer.parseInt(maybeNumber) * -1);
  }
  return "";
}

private String tryToInvert ( String maybeNumber ) { if ( ! maybeNumber . isEmpty ( ) ) { return Integer . toString ( Integer . parseInt ( maybeNumber ) * - 1 ) ; } return "" ; }
possible inputs are " " , " x " , " - x " with int x
