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 Storing Guesses

Jshell won't open my Game class

When I copied down the code in jshell,,,
Game game = new Game("treehouse"); Jshell responds with attempted to use class Game which cannot be instanciated or its methods

https://w.trhou.se/bu9nrehs95

2 Answers

ido amichay
ido amichay
1,665 Points

you should compile first( javac Hangman) and then try to instantiate the class in jshell) :)

Thanks!

Chris Needham
Chris Needham
1,871 Points

wouldn't work with mine either, I just tested it in Bluejay for now(another IDE for those that don't know)... works fine.. something odd..