Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Random Dice = new Random(); // build a dice to pick a random position in the array
- int n = Dice.nextInt(10);
- String random = (words[n]);
- return random; // return the word back to the main method
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement