Java Java Objects Delivering the MVP Arrays and Command Line Arguments

I need computer to choose random word

What if I do not want to input answer as command line and wants computer to generate random word, how should i Do it?

Chris Tvedt
Chris Tvedt
3,795 Points

You would have to make a list of words to take from, if you want a word that has meaning. If you just want "n"-number of letters to be a word, but with no meaning. You need to have a look at ASCII-tables and stuff like that. I do not want to give away to much here. Psudocode for the first option would be:

import java.util.Random;

Random rand = new Random();

listOfWords = words.....

randomly generate a number between 0 - listOfWords.size()-1

input = listOfWords.get(randomly generated number)

Hope this gives you something to work on.