Java math function to convert positive int to negative and negative to positive? June 9, 2023 by Tarik What about x *= -1; ? Do you really want a library function for this?