forked from menault/TD3_DEV51_Qualite_Algo
20 lines
578 B
Java
20 lines
578 B
Java
|
|
import java.util.*;
|
||
|
|
|
||
|
|
public class recherche_mot {
|
||
|
|
//Liste des mots
|
||
|
|
private static String[] WORDS = {
|
||
|
|
"Singe", "Google", "Frapper", "Haine", "Dio", "Java",
|
||
|
|
"Felix Vimalaratnam", "Lebreton", "Argent", "Pauvre", "Grocaillou"
|
||
|
|
};
|
||
|
|
|
||
|
|
public static void main(String[] args) {
|
||
|
|
//Permet de random
|
||
|
|
Random random = new Random();
|
||
|
|
//Prends le mot aléatoirement
|
||
|
|
String motrandom = WORDS[random.nextInt(WORDS.length)];
|
||
|
|
// Affiche l'mot
|
||
|
|
System.out.println("Mot qu'on prend d'facon random : " + motrandom);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|