title: For loop not calling methods
body: <p>I have never been so confused about something so basic. In this instance, I have a for loop that is using an ArrayList for an abstract class. This class contains a few different update methods, all of which are being used for different classes that extend the abstract class and overwrite the methods. (I didn't include all of the update methods because I didn't think it was necessary, you should be able to guess what they are) </p>
  
  <pre><code>public abstract class Objs extends JComponent{
  
  private int xpos;
  private int ypos;
  private int size;
  private boolean ai;
  
  
  public void update(){
  
  }
  
  public boolean getAI(){
      return ai;
  }
  
  public void update(int y, Container p){
  
  }
  
  public void update(int p, int x){
  
  }
  </code></pre>
  
  <p>So, in the for loop I have:</p>
  
  <pre><code>for(int i = 0; i &lt; objs.size() - 1; i++){
  
          objs.get(i).update(getParent());
  
          objs.get(i).update(getHeight(),(int)(objs.get(0).getYpos() - (.5 * objs.get(0).getS())));
  
          if(!(objs.get(i).getAI())){
              if(m[0])
                  objs.get(i).update(1, getParent());
              if(m[1])
                  objs.get(i).update(-1, getParent());
          }
      }
  </code></pre>
  
  <p>I have three different update methods. The first one works perfectly fine with my first class that is extending the abstract class. However, I have a second class using the second update method, and for some reason it seems like the method is not being called for that class. I honestly have no idea why not! What I have done for testing is outside of the for loop, called the method manually using the correct index and it works. So my only assumption left is that the For loop isn't calling the method for some reason. Any ideas?</p>