title: initialized variable doesn't change?
body: <p>Getting caught up on why this works. The variable <code>biggest</code> is initialized with a counter that starts at index 0 from the array list which is value of <code>3</code>. but when compared in the while loop it compares 3 whether 3 is more than 3 if not counter goes up. <code>counter</code> goes up but the initialized "biggest" variable remains the same. Why?</p>
  
  <pre><code> public static int greatest(ArrayList&lt;Integer&gt; list) {
          System.out.println(list); 
          int counter = 0;
  
          int biggest = list.get(counter); // biggest starts at index 0 - value 3 // this counter seems to go up but the "biggest"
                                          // value remains the same when the counter below goes up.
  
          while (counter&lt; list.size() ){// goes to while loop
              if ( list.get(counter)&gt;biggest){
                  biggest=list.get(counter);
              }
  
              counter++;
          }
  
          System.out.println(biggest);
          System.out.print(counter);  
          return biggest;   
      }            
  
      public static void main(String[] args) {
          ArrayList&lt;Integer&gt; lista = new ArrayList&lt;Integer&gt;();
          lista.add(3);
          lista.add(2);
          lista.add(71);
          lista.add(2);
  
          System.out.println("The greatest number is: " + greatest(lista));
      }
  </code></pre>