Sì
codice:ArrayList<Utente> utenti = ........ Random rnd = new Random(); ..... ..... Utente primoUtenteEstratto = utenti.remove(rnd.nextInt(utenti.size())); Utente secondoUtenteEstratto = utenti.remove(rnd.nextInt(utenti.size())); Utente terzoUtenteEstratto = utenti.remove(rnd.nextInt(utenti.size()));
È proprio tutto qui. Non mi pare difficile, vero?![]()



Rispondi quotando