Part 1 finis

This commit is contained in:
2025-10-08 14:25:38 +02:00
parent d074170b0f
commit 5d1126e8fe
4 changed files with 213 additions and 0 deletions

18
word_search.java Normal file
View File

@@ -0,0 +1,18 @@
import java.util.Random;
public class word_search {
// Liste des mots
private static String[] WORDS = {
"singe", "google", "frapper", "haine", "dio", "java",
"felix vimalaratnam", "lebreton", "argent", "pauvre", "grocaillou"
};
/**
* Retourne un mot aléatoire du tableau WORDS
*/
public static String getRandomWord() {
Random random = new Random();
return WORDS[random.nextInt(WORDS.length)];
}
}