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 trial

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

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