Java Java Objects Creating the MVP Prompting for Guesses

Edward Toonela
Edward Toonela
3,044 Points

Hangman.java:8: error: cannot find symbol

All the code should be identical to the instructor. I tried packaging and looked for typing errors, but I just can't wrap my head around where the mistake is located at.

Snapshot: https://w.trhou.se/z17335gq7g

Full-length description of the error:

Picked up JAVA_TOOL_OPTIONS: -Xmx128m
Picked up _JAVA_OPTIONS: -Xmx128m
Hangman.java:8: error: cannot find symbol
boolean isHit = prompter.promptForGuess();
^
symbol: method promptForGuess()
location: variable prompter of type Prompter
1 error

1 Answer

Steven Parker
Steven Parker
203,118 Points

The Hangman module is referencing a method named "promptForGuess" (capital "F"), but in the Prompter module, the method is defined as "promptforGuess" (lower-case "f").

Edward Toonela
Edward Toonela
3,044 Points

Thanks a million! I didn't know to look for it there like that, but it seems so obvious now.