Swap two integers

public class Swapvalues {

public void swapInts(int x, int y)
{
System.out.println(“before X =”+x+”Y=”+y);
x = x + y;
y = x – y;
x = x – y;
System.out.println(“after X =”+x+”Y=”+y);
}

public static void main(String args[])
 {
Swapvalues vSwapvalues = new Swapvalues();
vSwapvalues.swapInts(7, 8);
 }
}