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 Java Objects (Retired) Creating the MVP Prompting for Guesses

Brian Aberts
Brian Aberts
1,832 Points

Error: Connot Find Symbol.... Symbol: method applyGuess(char)

I feel like I have followed the video exactly... I cannot find anything wrong? But its hard for me to be sure because the Game game variable is confusing me

I think the error I'm having is because its missing applyGuess() method? ... I didn't see anything in the video with that method?... "return mGame.applyGuess(guess);" is just confusing me entirely.

Heres what I have:

import java.io.Console;

public class Prompter {

private Game mGame;

public Prompter(Game game) { mGame = game; }

public boolean promptForGuess(){ Console console = System.console(); String guessAsString = console.readLine("Enter a letter: "); char guess = guessAsString.charAt(0); return mGame.applyGuess(guess); }


1 Answer

Kourosh Raeen
Kourosh Raeen
23,733 Points

Hi Brian - The applyGuess() method that takes a char was developed in the previous video "Storing Guesses". It is a method of the Game class.