Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Java Java Objects Creating the MVP Getting Started

I am getting an error when i try to compile the code in the console.

here is the error code

Picked up JAVA_TOOL_OPTIONS: -Xmx128m
Picked up _JAVA_OPTIONS: -Xmx128m
Hangman.java:5: error: cannot find symbol
Game game = new Game("treehouse");
^
symbol: class Game
location: class Hangman
Hangman.java:5: error: cannot find symbol
Game game = new Game("treehouse");
^
symbol: class Game
location: class Hangman
2 errors

Everything looks exactly the same as Craig's

5 Answers

Timmie Nilsson
Timmie Nilsson
4,463 Points

You need to save in all the classes press CTRL + ALT + S on Windows.

Omar Silva
Omar Silva
2,535 Points

Did you create the file called Game.java?

Yes i did. still giving me an error

Ricardo Sala
Ricardo Sala
13,390 Points

Did you create that file IN THE SAME FOLDER? Otherwise is not visible to the main file.

Andy Home
Andy Home
3,096 Points

Hey Alessandro Agostinelli, hope all is well. To fix that error u will have to capitalize P and G in the Prompter.java file name and the Game.java file name.

Alan Wilson
Alan Wilson
4,593 Points

I had the same error, my .java was capitalized so my class was "Game.Java" instead of "Game.java". That fixed it for me