Java Java Objects Delivering the MVP Arrays and Command Line Arguments

Victor Curtis Jr
Victor Curtis Jr
3,193 Points

Getting 1 Error when Compiling

I'm getting one error when compiling and don't know how to fix it. Here is my code.

public class Hangman {

  public static void main(String[] args) {
      if (args.length == 0) {
      System.out.println("Usage:   java Hangman <answer>");
      System.err.println("answer is required");
      System.exit(1);
    }
    Game game = new Game(args[0]);
    Prompter prompter = new Prompter(game);
    while (game.getRemainingTries() > 0) && !game.isWon()) {
      prompter.displayProgress();
      prompter.promptForGuess();
    }
   prompter.displayOutcome(); 
    }
}

The error I'm getting is this:

treehouse:~/workspace$ javac Hangman
Picked up JAVA_TOOL_OPTIONS: -Xmx128m
Picked up _JAVA_OPTIONS: -Xmx128m
error: Class names, 'Hangman', are only accepted if annotation processing is explicitly requested
1 error

Please help. I have no idea what to do or how to fix it. Thanks!

1 Answer

bot .net
bot .net
10,260 Points

post the all code please with a proper formatting