Obtenez un élément aléatoire de String Array Java
String random = (fruits[new Random().nextInt(fruits.length)]);
Yucky Yak
String random = (fruits[new Random().nextInt(fruits.length)]);
String[] fruits = {"Apple","Mango","Peach","Banana","Orange","Grapes","Watermelon","Tomato"};