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 trialRobert Spring
3,349 PointsError: cannot find symbol Prompter
Below is my code.
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");
}
}
}
I get the following error when trying to compile:
Hangman.java:6: error: cannot find symb
Prompter prompter = new Prompter(ga
^
symbol: class Prompter
location: class Hangman
Hangman.java:6: error: cannot find symb
Prompter prompter = new Prompter(ga
^
symbol: class Prompter
location: class Hangman
2 errors
2 Answers
Florian Tönjes
Full Stack JavaScript Techdegree Graduate 50,856 PointsHey Robert,
the compiler is not able to find the Prompter class. Are you using Workspaces?
Kind Regards, Florian
Anne Xu
11,572 PointsRobert,
Try making sure you have import java.io.Console; written in the first line of your Prompter.java file. That should fix the problem.
Nikita Struggs
2,642 PointsNikita Struggs
2,642 Pointsgetting the same error. i am using workspaces