I can't figure out this equation related to array and loops
<p>I'm taking an online java course via edx and I was prestented with the following equation.</p>

<pre><code>int[] array = new int[] {11, 22, 33, 44, 55};
double average = 0;
for (int element : array){
    average += element;
}
if (array.length &gt; 0){
    average = average / array.length;
}
System.out.println(average);
</code></pre>

<p>What the questions asks of me is "What does it print?", The answer is 33 but I have spent 3 hours trying to calculate it and I can't get the right answer for the life of me.</p>