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 trialDean Onizuka
4,753 Points[SOLVED] error: cannot find symbol applyGuess
not sure why this isnt working...
public class Game {
private String mAnswer;
private String mCorrect;
private String mWrong;
public Game(String answer) {
mAnswer = answer;
mCorrect = "";
mWrong = "";
}
public boolean applyGuess(char letter) {
boolean isCorrect = mAnswer.indexOf(letter) >= 0;
if (isCorrect) {
mCorrect += letter;
} else {
mWrong += letter;
}
return isCorrect;
}
}
ERROR: cannot find symbol
symbol: method applyGuess(char)
location: class Evaluation
applyGuess('o');;
^
Ken Alger
Treehouse Teacheredited for [SOLVED]
Jeffrey Pavlov
16,191 Pointsthanks Dean! this one kinda stumped me.
Berkley Frei
6,292 PointsI had the same problem- thanks for the solve!
Athoug Alsoughayer
7,949 PointsThank you for keeping this up. I too encountered the same error and this helped solve it.
Dean Onizuka
4,753 PointsDean Onizuka
4,753 Pointsfigured it out. gonna leave this up just in case anyway else runs into this problem but when using the repl make sure you type game.applyGuess and not just applyGuess