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(); } }
查找代码错误.java
原文:http://www.cnblogs.com/WJ-163/p/5575078.html