/*
* Random phrase generation machine
*/
public class Pharse {
public static void Main (string[] args) {
Feel free to add characters
String[] Wordlistone = {
"Three", "group", "the", "I", "Oh", "hot", "ear", "Low", "Ann"
};
String[] Wordlistthree = {
"Three", "no", "see", "Fly", "\ \ (^o^)/~", "first", "ear", "low", "with"
};
String[] Wordlisttwo = {
"Dog", "group", "See", "Fly", "Oh", "first", "Yes", "low", "speed"
};
Calculate how many terms each group has
int onelength = Wordlistone.length;
int twolength = Wordlisttwo.length;
int threelength = Wordlistthree.length;
Generate random numbers
int rand1 = (int) (Math.random () *onelength);
int rand2 = (int) (Math.random () *twolength);
int rand3 = (int) (Math.random () *threelength);
Combine the terms
String phrase = Wordlistone[rand1] + "" + Wordlisttwo[rand2] + "" +wordlistthree[rand3];
Output
System.out.println (phrase);
}
}
Randomly generate a name or a code machine