title: Finding min/max in an array - Steps through a loop
body: <p>I found a lot of solutions how to find the min or max of an int array. But I am not quiet sure how it works, so I am hoping somebody could explain me the steps through the loop.
  I have a main class with 3 Cars and their cylinder capacity. So I found this example for a loop to find out which car has the highest cc.</p>
  
  <pre><code>int[] ccArr = {Car1.Engine, Car2.Engine, Car3.Engine};
  int max = 100000;
          for (int i=0; i &lt; ccArr.length; i++){
              for (int j = 1; j &lt; ccArr.length; j++)
                  if(ccArr[i] &lt; ccArr [j])
                      max = ccArr[j];
  </code></pre>
  
  <p>So how does it work? I just cant get it in my head, what exactly these loops are doing. Your help is very much appreciated and thanks in advance!</p>
  
  <p>Greetings</p>