标签:c style class blog code java
public static void main(String[] args) { TestObject data = new TestObject(); System.out.print("-----"+data.getA()); change(data); System.out.print("-----"+data.getA()); } public static void change(TestObject iObject){ iObject = new TestObject(); iObject.setA(10); System.out.print("-----"+iObject.getA()); } static class TestObject{ private int a = 100; public int getA() { return a; } private void setA(int ia) { a = ia; } }
java String 之参数传递,布布扣,bubuko.com
标签:c style class blog code java
原文地址:http://blog.csdn.net/actsai/article/details/28392427