public class Swapping {
static void swap(int i,int j){
int temp=i;
i=j;
j=temp;
System.out.println("i = " + i + " j = " + j);
}
public static void main(String[] args){
int i=1;
int j=2;
swap(i,j);
}
}In this code, I am going to explain about the Simple Swapping program in Java.
