What does pre incrementing array object (++frequency[i]; ) mean?
<pre><code>public class ArrayStudentPoll {
    public static void main( String args[] )
    {
       // array of survey responses
       int responses[] = { 1, 2, 6, 4, 8, 5, 9, 7, 8, 10, 1, 6, 3, 8, 6, 
         10, 3, 8, 2, 7, 6, 5, 7, 6, 8, 6, 7, 5, 6, 6, 5, 6, 7, 5, 6, 
         4, 8, 6, 8, 10 };
       int frequency[] = new int[ 11 ]; // array of frequency counters

       // for each answer, select responses element and use that value 
       // as frequency index to determine element to increment
       for ( int answer = 0; answer &lt; responses.length; answer++ )
          ++frequency[ responses[ answer ] ];


       System.out.printf( "%s%10s\n", "Rating", "Frequency" );

       // output each array element's value
       for ( int rating = 1; rating &lt; frequency.length; rating++ )
          System.out.printf( "%6d%10d\n", rating, frequency[ rating ] );
   }
}
</code></pre>

<p>This is the code I'm looking at it in my project. </p>

<p>Everything I understand but the part <code>++frequency[i];</code> where frequency is an array and not a number? What exactly it is doing there? They wrote comments but still, I didn't get them.</p>

<p>Here is the result I am getting out of it </p>

<pre><code>Rating Frequency
     1         2
     2         2
     3         2
     4         2
     5         5
     6        11
     7         5
     8         7
     9         1
    10         3
</code></pre>