public class Test1 {
public static void main(String args[]) {
double x = 0;
Test.Ad(x);
System.out.println(x);
}
}
public class Test{
public static void Ad(double x){
x = x + 1;
System.out.println(x);
}
} 最后打印的结果是1 和 0 ,不该是1 和 1么?
public static void main(String args[]) {
double x = 0;
Test.Ad(x);
System.out.println(x);
}
}
public class Test{
public static void Ad(double x){
x = x + 1;
System.out.println(x);
}
} 最后打印的结果是1 和 0 ,不该是1 和 1么?