title: cannot make a static reference to the non-static java
body: <p>I am trying to learn java. Forgive me if my concepts are not clear or very wrong. 
  I am trying to create inheritance and polymorphism application. </p>
  
  <p>I have created an array of Animals[5]. I am trying to add refrences of dog, cat to the array. 
  I want it to hold 
  Animals[0] = zooDog</p>
  
  <p>I am getting error that
  cannot make a static reference to the non-static</p>
  
  <p>I have create AnimalstestDrivve class</p>
  
  <pre><code>package animals;
  
  public class AnimalstestDrive {
  
      public Animals[] myZoo = new Animals[5];
      int zooCounter = 0;
  
      public static void main(String[] args) {
  
          //Set animals array
          Dog zooDog = new Dog();
          addAnimals(zooDog);
  
          Cat zooCat = new Cat();
          addAnimals(zooCat);
  
      }
  
      public void addAnimals(Animals a){
          if ( zooCounter &gt; 5 ){
              myZoo[zooCounter] = a;
              zooCounter++;
          }
          else
              System.out.println("Zoo is full");
      }
  }
  </code></pre>
  
  <p>here is my Animals class</p>
  
  <pre><code>package animals;
  
  public abstract class Animals {
      private String Name;
      private int Size; //Size on the scale 1 to 10
  
      public void eatFood(){
          System.out.println("I am eating food");
      }
  
      public void sleep(){
          System.out.println("I am sleeping now");
      }
  
      abstract public void makeNoises();
  
  }
  </code></pre>
  
  <p>Simple dog, cat class</p>
  
  <pre><code>package animals;
  
  public class Dog extends Animals {
      public void makeNoises(){
          System.out.println("Bow! bow!");
      }
  }
  </code></pre>