Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialSebastian Eguez
8,248 PointsWhat am I doing wrong?
public class Hangman {
public static void main(String[] args) {
// Enter amazing code here:
Game game = new Game("treehouse");
Prompter prompter = new Prompter(game);
boolean isHit = prompter.promptForGuess();
if (isHit) {
System.out.println("We got a hit!");
} else {
System.out.println("Whoops that was a miss");
}
}
}
Hangman.java:7: error: cannot find symbol
boolean isHit = prompter.promptForGuess();
^
symbol: method promptForGuess()
location: variable prompter of type Prompter
1 error
THANKS!
2 Answers
Ken Alger
Treehouse TeacherSebastian;
In your prompter.java
your method name is promtForGuess
. That is where the typo is.
Ken
codeoverload
24,260 PointsYou mistyped the "promptForGuess" method in the Prompter class.
Sebastian Eguez
8,248 PointsI'm sorry. How did I mistype it?
Sebastian Eguez
8,248 PointsSebastian Eguez
8,248 PointsCheers.