new to java,stuck on chapter 4 arrays
<p>i am a beginner to java and i'm studying from Head First Java. in one example it gives the following code and asks for the possible output (given as: 14 1). what does m4a[x].counter do? what value do we get from it? thank you.</p>

<pre><code>public class Mix4{
  int counter = 0;
  public static void main(String args[]){
    int count = 0;
    Mix4 [] m4a = new Mix4[20];
    int x = 0;
    while (x &lt; 9){
      m4a[x] = new Mix4();
      m4a[x].counter = m4a[x].counter+1;
      count = count + 1;
      count = count + m4a[x].maybeNew(x);
      x = x + 1;
    }
    System.out.println(count + " " + m4a[1].counter);
 }
 public int maybeNew(int index){
   if(index&lt;5){
     Mix4 m4 = new Mix4();
     m4.counter = m4.counter + 1;
     return 1;
  }
  return 0;
}
</code></pre>

<p>}</p>
