如下,帮我分析下
class Test { int num = 3; public static void main(String[] args) { Test t = new Test(); t.num = 5; method(t); System.out.println(t.num); } public static void method(Test t){ t.num = 6; } } 如下 下一个题 class Test { int num = 3; public static void main(String[] args) { Test t = new Test(); t.num = 5; method(new Test()); System.out.println(t.num); } public static void method(Test t){ t.num = 6; } }
|