title: Java abstract class implements interface
body: <p>I have the following interface and abstract class that implements it:</p>
  
  <pre><code>interface Walk {
      String walk();
  }
  
  public abstract class Animal implements Walk {
      abstract String MakeNoise();
  }
  </code></pre>
  
  <p>And the following concrete implementations:</p>
  
  <pre><code>class Cat extends Animal {
      String MakeNoise() {
          return "Meow";
      }
  
      @Override
      String walk() {
          return "cat is walking";
      }
  }
  
  class Dog extends Animal {
      @Override
      String walk() {
          return "Dog is walking";
      }
  
      @Override
      String MakeNoise() {
          return "bark";
      }
  }
  
  class Human {
      public void Speak() {
          System.out.println("...Speaking...");
      }
  }
  </code></pre>
  
  <p>Putting it all together:</p>
  
  <pre><code>class MainClass {
      public static void main(String[] args) {
          Random randomGen = new Random();
  
          Animal[] zoo = new Animal[4];
          zoo[0] = new Cat();
          zoo[1] = new Dog();
          zoo[2] = new Cat();
          zoo[3] = new Cat();
          // System.out.println(zoo[ randomGen.nextInt(2)].MakeNoise());
          for (Animal animal : zoo) {
              if (animal instanceof Dog) {
                  Dog jeffrey = (Dog) animal;
                  System.out.println(jeffrey.MakeNoise());
              }
  
          }
      }
  }
  </code></pre>
  
  <p>I get this error </p>
  
  <blockquote>
    <p>"walk() in Cat cannot implement walk() in Walk " .  </p>
  </blockquote>
  
  <p>Any ideas? thanks</p>