初始化数据
public class ListRmDuplicate {
private List<String> list;
private List<Player> playerList;
@BeforeEach
public void setup() {
list = new ArrayList<>();
list.add("kobe");
list.add("james");
list.add("curry");
list.add("zimug");
list.add("zimug");
playerList= new ArrayList<>();
playerList.add(new Player("kobe","10000")); //科比万岁
playerList.add(new Player("james","32"));
playerList.add(new Player("curry","30"));
playerList.add(new Player("zimug","27")); // 注意这里名字重复
playerList.add(new Player("zimug","18")); //注意这里名字和年龄重复
playerList.add(new Player("zimug","18")); //注意这里名字和年龄重复
}
}