Is there a Java function to convert a positive int to a negative one and a negative int to a positive one?
I\'m looking for a reverse function to perfor
reverse
We can reverse Java number int or double using this :
int x = 5; int y = -7; x = x - (x*2); // reverse to negative y = y - (y*2); // reverse to positif
Simple algorithm to reverse number :)