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

Please help me!!! Stuck in java objects

My workspace = https://w.trhou.se/s2qrzgyzlp Compile Hangman.java using clear && javac Hangman.java && java Hangman

3 Answers

Hi there,

There's a few issues here; I'll work through the errors I am getting reported.

  1. Game.java line 12 - misspelled public
  2. Prompter.java line 39. You can't add a condition to an else - delete (!game.isWon())
  3. Prompter.java line 38 - add brackets to getRemainingTries()

I think that's it ...

Steve.

Yep - checked and the program runs. I don't know if it works as intended but it'll compile and run now.

Thanks a lottt!!!!!! Steve

No problem! :+1:

The program works as i wanted it to....

Excellent! :smile: