标题: 看程序写结果.. [打印本页] 作者: shijialong1111 时间: 2016-7-1 17:52 标题: 看程序写结果.. 看程序写结果
public static void main(String[] args) {
int a = 10;
int b = 20;
System.out.println("a:"+a+",b:"+b); a = 10 b = 20 ;
change(a,b);
System.out.println("a:"+a+",b:"+b); a = 10 b = 20;
public static void change(int a,int b) {
System.out.println("a:"+a+",b:"+b); a = 10 b = 20;
a = b; a = 20;
b = a + b; b = 40;
System.out.println("a:"+a+",b:"+b); a = 20 b = 40;
}