title: Java: Implementing a drawable class
body: <p>I'm trying to make a maze game in Java.</p>
  
  <p>The Explorer class represents the user, and the DrawableExplorer is the code that graphically represents the user. DrawableExplorer implements the Drawable interface which contains:</p>
  
  <pre><code>    import java.awt.Graphics;
  
      public abstract interface Drawable
      {
        public abstract void draw(Graphics paramGraphics);
      }
  </code></pre>
  
  <p>this compiles successfully however, I cannot figure out why my DrawableExplorer class isn't:</p>
  
  <pre><code>    import java.awt.*;
      public class DrawableExplorer extends Explorer implements Drawable
  
  {
  
      public DrawableExpolorer(Square location, Maze maze, String name)
          {
              public void draw(Graphics g)
                  {
                      Square location = location();
                      get.setColor(Color.BLUE);
                      g.fillOval(loc.x() + 10, loc.y() + 10, 30, 30);
  
                  }
          }
  }
  </code></pre>
  
  <p>It's asking for a return type but isn't my method void?</p>
  
  <p>The compiler error message says "invalid method declaration; return type required"</p>