So, its sort of like hangman, All my code is able to do is to produce a random word, i have no idea how to change the letters in the string to this: "*", and how to change it back to the normal letters when the user guesses the write letter, please help.
String dictionaryWord= " "; String[] words = { "hospital", "house", "car", "banana", "petres", "fly", "money", "computer" } ; String prompt = "enter a letter: "; char letter; letter = prompt.charAt(0); Random r = new Random (); dictionaryWord = words[r.nextInt(words.length)]; String [] inviwords = new String [dictionaryWord.length()]; for (int i = 0 ; i < dictionaryWord.length() ; i++) { c.setCursor (10, 10); inviwords [i] = "*"; prompt += inviwords [i] + " "; c.println (words [i]); }