swapping of two numbers in java

Java
int a,b;//a=first number , b=second number
int temp=a;
a=b;
b=a;
// print a and b 
Source

Also in Java: