how to randomize a string variable in an array java code example
Example 1: get random element from string array java
String random = (fruits[new Random().nextInt(fruits.length)]);
Example 2: get random element from string array java
String[] fruits = {"Apple","Mango","Peach","Banana","Orange","Grapes","Watermelon","Tomato"};