class Other{ public int i; } class Something{ public static oivd main(String[]args){ Other o = new Other(); new Something().addOne(o); } public void addOne(final Other o){ o.i++; o=new Other(); } }
转载于:https://www.cnblogs.com/WJ-163/p/5575078.html
class Other{ public int i; } class Something{ public static oivd main(String[]args){ Other o = new Other(); new Something().addOne(o); } public void addOne(final Other o){ o.i++; o=new Other(); } }
转载于:https://www.cnblogs.com/WJ-163/p/5575078.html