拳头输出和第二拳System.out.println()
不一样System.out.println()
可能是什么原因?
public class swapex{
public static int var1, var2;
public void badSwap(int var1, int var2){
int temp = var1;
this.var1 = var2;
this.var2 = temp;
System.out.println("var1 " + var1 + " var2 "+ var2);
}
public static void main(String args[])
{
swapex sw= new swapex();
sw.badSwap(10,20);
System.out.println("var1 " + var1 + " var2 "+ var2);
}
}