title: Eclipse is rejecting my public void init method
body: <p>Eclipse SDK v3.2.1 is rejecting my <strong>public void init</strong> method.<br>
  I'm using the following imports:</p>
  
  <pre><code>import acm.graphics.*;
  import acm.program.*;
  import acm.util.*;
  </code></pre>
  
  <p>My program has a run() method and an init() method but the init() is causing these errors</p>
  
  <pre><code>- overrides acm.program.Program.init
  - Cannot override the final method from Program
  </code></pre>
  
  <p>Note, this is not a stand-alone application yet. Just running it from the Eclipse editor.</p>
  
  <p>Apparently there is a an init method in the acm.program library.  How do I implement my own initization method without attempting to override the acm.program built-in one?  I've tried making my init method private with <strong>private void init</strong> but then I get:</p>
  
  <pre><code>- Cannot reduce the visibility of the inherited method from Program
  - Cannot override the final method from Program 
  </code></pre>
  
  <p>Here is the code so far.  The error is with the init().</p>
  
  <pre><code>public class Hangman extends GraphicsProgram {
  
      //CONSTANTS
  private static int NUMBER_OF_INCORRECT_GUESSES = 8;
  
  
  //Initialize the program
  public void init() { //this gives compiler a problem
  HangmanCanvas canvas = new HangmanCanvas();
  add(canvas);
  }
  
  
  
  public void run() {
  </code></pre>
  
  <p>/* When the user plays Hangman, the computer first selects a secret word at
      random from a list built into the program. The program then prints out a row of dashes—one
    for each letter in the secret word—and asks the user to guess a letter.  If the user guesses
    a letter that is in the word, the word is redisplayed with all instances of that letter 
    shown in the correct positions, along with any letters correctly guessed on previous turns.
    If the letter does not appear in the word, the user is charged with an incorrect guess.
    The user keeps guessing letters until either (1) the user has correctly guessed all the
    letters in the word or (2) the user has made eight incorrect guesses. */</p>
  
  <pre><code>HangmanLexicon lexicon = new HangmanLexicon();
  RandomGenerator rgen = new RandomGenerator();
  int wordIndex = rgen.nextInt(0, lexicon.getWordCount()-1);
  
      while (true) { //allows multi-play
          int play = 0;
          String answer = readLine ("Want to play?");
          if(answer.equals("Y") || answer.equals("y") || answer.equals("yes") || answer.equals("Yes")) {play = 1;}
          if(play == 0) {break;}
          //Initialize some stuff
          //get new random word
          secretWord = lexicon.getWord(rgen.nextInt(0,wordIndex));
          println("Welcome to Hangman.");
          secretWord = secretWord.toUpperCase(); // convert secret word to upper case
          int length = secretWord.length();
          //reset game variables
          String guess = "";
          //clear the canvas
          canvas.reset();
          //reset the wrong answer count
          wrong = 0;
  </code></pre>
  
  <p>//    build the blank status word</p>
  
  <pre><code>        currentWord = ""; //reset the word for multi-play
  </code></pre>
  
  <p>//    build the dashes in status word as long as the secret word.</p>
  
  <pre><code>        for (int i = 0; i &lt; length; i++) {
              currentWord += "-";
          }
          println("The word looks like this  " + currentWord);
  
          while (wrong&lt;NUMBER_OF_INCORRECT_GUESSES &amp;&amp; !currentWord.equals(secretWord)) {
              guess = ".";
              char g = guess.charAt(0);
              while (!Character.isLetter(g)){ //if input is not a character, keep asking
                  guess = readLine("Guess a letter: ");
                  guess = guess.toUpperCase();
                  g = guess.charAt(0);
                  if (!Character.isLetter(g)){println("Your guess is not a single letter. Guess again: ");}
              }
              if(secretWord.indexOf(guess) &lt; 0) {/*if guess is not in the secret word, increment wrong answer count and print message
               to that effect. */
                  wrong++;
                  println("Threre are no " + guess + "\'s in the word.");
                  println("You have " + (NUMBER_OF_INCORRECT_GUESSES - wrong)  + " guesses left.");
              }
              else {
                  println("That guess is correct.");
                  currentWord = wordBuild(guess);
                  if (currentWord.equals(secretWord)) { //if win print win but don't bother with the update to display
                      println("You win! You guessed the word: " + secretWord);}
  
                      else {  println("The word now looks like this  " + currentWord); //print the updated dash word
                      println("You have " + (NUMBER_OF_INCORRECT_GUESSES - wrong)  + " guesses left.");
                      }           
              }
          }
  
      if(!currentWord.equals(secretWord)) {println("You lose.");}   //out of guesses and  word is not good.
      }
  }
  </code></pre>
  
  <p>//Build and/or update the dash word ------ displayed</p>
  
  <pre><code>    public String wordBuild(String guess) {
          String dashWord = "";
          for (int i = 0; i &lt; secretWord.length(); i++) {
                  if(secretWord.charAt(i) == guess.charAt(0)) { 
                  dashWord = dashWord + guess;
                  }
                      else {dashWord = dashWord + currentWord.charAt(i);
                  }
          }
              return dashWord;
  
      }
  
  
  
  //INSTANCE VARS
  
  int wrong = 0;  
  String currentWord = "";
  String secretWord = "";     
  private HangmanCanvas canvas;
  
  } //end of class
  </code></pre>