static List<Dependent> warland = new ArrayList<Dependent>();
被static声明后的arraylist数组只会被分配一块内存,不论有多少对象要用到这个arraylist,都只会共用一块内存空间。
解决办法,将static去掉。
List<Dependent> warland = new ArrayList<Dependent>();
原文:https://www.cnblogs.com/yanzhao-x/p/11368633.html