java中方法的形參產生的是對象的副本

class SubTest{ int a; String b; public SubTest(int a, String b){ this.a = a; this.b = b; } } public class MyTest { private static void change(SubTest test){ test.a = 100; test = new SubTest(10, "java"
相關文章
相關標籤/搜索