+ 2
How to user the Random class with strings? (import java.util.Random)
Hey, I looked in the web und searched, but I don't found , how I can use the random class with strings. I only found it with for example 1 <60 , bit I need to programm random words... Can I also make System.out.println("Hello" || "Bye" || "Chao" || "...")? Or isnt it possible? Thanks for help. Getman answers are better then english , but both is ok.
1 Respuesta
0
You can create an array with the words in it and get the item at a random index