class Demo01 {
public static void main(String[] args) {
int a = 10;
int b = 20;
System.out.println("a="+a+"b="+b);
change (a,b);
System.out.println("a="+a+"b="+b); //猜猜这行输出的效果
}
public static void change(int a,int b) {
a = b;
b+=a;
System.out.println("a="+a+"b="+b);
}
} |
|