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 trialRoss Killion
3,665 PointsConsistent error about a missing return statement and also "expecting ;".
Ni hao, Here is the error I keep getting. I've really tried to proofread all of my code but I cannot find the error. Here is a link to a snapshot: https://w.trhou.se/i1yacdrlyc. Thank you!
| clear && javac Hangman.java && java Hangman
| ^-----^
| Error:
| cannot find symbol
| symbol: variable java
| clear && javac Hangman.java && java Hangman
| ^--^
| Error:
| missing return statement
| clear && javac Hangman.java && java Hangman
| ^-----------------------------------------^
1 Answer
Assya Raskin
839 PointsI think your Game class doesn't have '}' at the end, after applyGuess is closed with '}'