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

Is there anyone out there in Java land that cares to help me fix my code?

3 Answers

You've got an issue with the curly braces in the promptForGuess method. The while loop ends way too soon so the variable guessAsString is no longer in scope. You're also missing the curly brace and the end after the return statement.

You have throw "now" instead of new ... On line 90 something. That's all I can see so far

Actually it's line 25 in Game.java

Thanks Nnenna. I fixed that. Now the error states that:

In the Promoter class: there was an via try without catch illegal start of expression with my displayProgress method

it can't find the symbol displayProgress(); and somewhere in that method there was an illegal start in the expression

isHit statement w/ guessAsString;

it says the error is w/ the variable guessAsString