I have tried it a permute method like in c(procedure) but it did't work also i don't understand why it must be static
public class permute {
public static void permute(int a,int b){
int x=a;
a=b;
b=x;
}
public static void main(String[] args){
int a=2;int b=4;
System.out.println("a= "+a+"b= "+b);
permute(a,b);
System.out.println("a= "+a+"b= "+b);
}
}