public List<Player> playerNum(){ List<Integer> idList=new ArrayList<Integer>(); for(int i=0;i<2;i++){ int a=console.nextInt(); if(idList.contains(a)){ continue; }else{ idList.add(a); System.out.println("qingshuru"); name=console.next(); player.add(new Player(a,name)); } System.out.println(idList); }
添加回答
举报
0/150
提交
取消