Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package e2;
- import java.util.Iterator;
- public class selectCandidates {
- public static String selectCandidates(TVRealityList TV, int k){
- TV.setK(k);
- Iterator<String> it = TV.iterator();
- String resultado="";
- while(it.hasNext()){
- System.out.println("("+it.next()+")");
- it.remove();
- }
- System.out.println("Ganador: " + TV.getLista().get(0));
- resultado=TV.getLista().get(0);
- return resultado;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement