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

having a problem with the prompter

https://teamtreehouse.com/workspaces/33046772# bad source file for Prompter prompter = new Prompter(game);

Can you share your workspace again - that link isn't working. Use the fork icon and share that URL.

Thanks,

Steve.

I think the workspace URL is only available to you. You want to share a snapshot URL (see https://teamtreehouse.com/library/previews-and-snapshots )

Yep - hit the camera icon and we can then fork it and view your code. Once you've done that we can try to get you back up and running!

2 Answers

you made a few spelling mistakes:

import java.util.Scanner;     //spelling mistake

class Prompter {     //spelling mistake
  private Game game;

  public Prompter(Game game){
    this.game = game;
  }
  public boolean promptForGuess() {
    Scanner scanner =new Scanner(System.in);
    System.out.print("Enter a letter:  ");
    String guessInput = scanner.nextLine();
    char guess = guessInput.charAt(0);
    return game.applyGuess(guess);     //spelling mistake

  }
}

I fixed a couple spelling mistakes (see the lines with comments). I compiled and hangman ran okay.

tnx it's working now.