Java Java Objects Delivering the MVP Arrays and Command Line Arguments

Victor Curtis Jr
Victor Curtis Jr
4,082 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");
    Game game = new Game(args[0]);
    Prompter prompter = new Prompter(game);
    while (game.getRemainingTries() > 0) && !game.isWon()) {

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

post the all code please with a proper formatting