package class8_1_Swapping; public class SimpleSwapping { public static void main(String[] args) { int x; int y; x = 3; y = 9; // ... // We want to swap the values in x & y. // int tmp; //// int tmp2; // tmp = x; //// tmp2 = y; // x = y; //// y = x; // y = tmp; int tmp; tmp = x; x = y; y = tmp; } }