title: Comparing elements in an arraylist
body: <p>I have to check to see if the "tokens" in the arraylist are in increasing order.</p>
  
  <pre><code>private E[] data;      // where the data is stored   
  private int size;      // how many items have been added to the list
  
  public TopSpinArray(int numTokens, int spinSize)
  {
      super(numTokens, spinSize);
  
      data = (E[])(new Object[numTokens]);
      size = 0;
  } 
  
  public boolean isSolved()
  {     
      for(int i = 0; i &lt; numTokens; i++)
      {
          if(data[i] &lt; data[i+1])
          { 
              return true;
          }
      }
      return false;
  }
  </code></pre>
  
  <p>when I compile, it says "bad operand types for binary operator '&lt;'
                             first type: E; second type: E"</p>
  
  <p>how do I check to see if they are increasing?</p>