title: Processing error: x cannot be resolved or is not a field (java with the processing app)
body: <p>So I am using processing in java mode.</p>
  
  <p>There is a function: <code>ellipse(int,int,int,int)</code> that draws an ellipse.</p>
  
  <p>I want this program to add a bullet object to the bulletHolder arraylist when the mouse is clicked and then display ellipses for each of these bullet objects based on their x and y property values.</p>
  
  <p>however an error is occurring saying that 'x cannot be resolved or is not a field'</p>
  
  <p>on the line: <code>ellipse((int) bulletHolder.get(i).x, (int) bulletHolder.get(i).y, 50, 50);</code></p>
  
  <p>Here is my full code</p>
  
  <pre><code>public ArrayList&lt;Bullet[]&gt;  bulletHolder= new ArrayList&lt;Bullet[]&gt;();
  int count = 0;
  void setup(){
    size(500,500); 
  }
  
  
  void draw(){
    if(count!=0){
      for(int i =0; i&lt;count; i++){
         ellipse(bulletHolder.get(i).x, bulletHolder.get(i).y, 50, 50); 
      }
    }
  }
  
  void mouseClicked(){
    bulletHolder.add(new Bullet(mouseX,mouseY));
    count++;
  }
  
  class Bullet {
    int x;
    int y;
    Bullet(int x,int y){
     this.x = x;
     this.y=y; 
    }
  }
  </code></pre>