Using Extend and implement

I am making a game and have have several LinkedLists with different objects that I want to .draw()

I would like them all to belong to a class that i call Drawable but even as I use: ~Class Monster Extends Drawable.
I still cant assign it to (Drawable). When I do it says expected (Drawable) but found Monster.

What am I doing wrong? :-/

Post the actual code and compiler error.

Without seeing the code, it’s hard to say, but extends should be lowercase.

After your answers I made some new objects with the Extends and it solved the problem, never knowing what the original issue was. Thanks

Mhm, sounds wired.

You use extends for classes, e.g.


public class Animal {
  public void doIt() {
      System.out.println("Animal.doIt");
  }
}

public class Dog extends Animal {
  public void woof() {
    System.out.println("Dog.woof()");
  }
}

In general, each class should be in it’s own file which is is called ClassName.java ( here Animal.java and Dog.java ).

Interfaces are used for describing general behaviour, for example a Plug-In architecture.