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 trialgregory gordon
Full Stack JavaScript Techdegree Student 14,652 Points./Prompter.java:11: error: cannot find symbol
./Prompter.java:11: error: cannot find symbol
while (mGame.getRemainingTries() > 0) {
^
symbol: method getRemainingTries()
location: variable mGame of type Game
./Prompter.java:26: error: cannot find symbol
mGame.getRemainingTries(),
^
symbol: method getRemainingTries()
location: variable mGame of type Game
2 errors
have no clue how to fix
1 Answer
Luke King
740 PointsI'm getting the exact same problem
Prompter.java
public void displayProgress() { System.out.printf( "You have %d tries to solve %s \n " , getRemainingTries() , mGame.getCurrentProgress()); }
Game.java
public int getRemainingTries() {
return MAX_MISSES - mMisses.length();}
gives the single error when compiled: indicated on the above lines.
error: cannot find symbol
symbol: method getRemainingTries()
location: Class Prompter
Walter Allen
iOS Development with Swift Techdegree Student 16,023 PointsWalter Allen
iOS Development with Swift Techdegree Student 16,023 PointsHey there. In order to help, you'll need to post your code, not just the error message. If you are getting a 'cannot find symbol' message on 'while', my guess is that you've left off a semi-colon or curly brace somewhere. Post your .java file and we can help more. :)