值传递与引用传递

值传递(指针传递) public class passbyvalue { private void one(int x){ x += 1; System.out.println("one中x="+x); } public static void main(String[]args){ passbyvalue test=new passbyvalue(); int x=1; test.one(x);
相关文章
相关标签/搜索