title: arraylist giving "cannot be resolved" and "cannot be resolved to a type" errors (eclipse)
body: <p>I'm writing a Selection Sort program, and it's still unfinished, so there are a lot of errors, but the one I'm looking to fix first is the error that eclipse keeps giving me:</p>
  
  <pre><code>thelist cannot be resolved to a type
  </code></pre>
  
  <p>and again, in the rest of the program:</p>
  
  <pre><code>thelist cannot be resolved
  </code></pre>
  
  <p>my program looks like this:</p>
  
  <pre><code>import java.util.ArrayList;
  public class SelectionSort {
  
  public static void main(String[] args) {
      final int N = Integer.parseInt(args[0]);
      //populate list with number from 1 to N
  
      // Create an ArrayList containing Integer type elements
      ArrayList&lt;Integer&gt; thelist = new ArrayList();
  
      //while loop to accept a new value from random generator
  
      //call sort method
  }
  
  public static void sort(final thelist&lt;Integer&gt; list) {
  
      // declare an int variable to hold value of index at which the element
      // has the smallest value
          int smaller = 0;
          int b=0;
  
       // declare an int variable to hold the smallest value for each iteration
       // of the outer loop
          int smallerindex = 0;      
  
          for(int a=1;a&lt;thelist.size();a++){
              /* find the index at which the element has smallest value */
              // initialize variables
              smaller = thelist.get(a-1);
              smallerindex = a-1;
  
              for(b=a;b&lt;thelist.size();b++){
                  if(thelist.get(b)&lt;smaller){
                      // update smallest
                      smaller = thelist.get(b);
                      smallerindex = b;
                  }
              }
           // do nothing if the curIndex has the smallest value
              //Swap the smallest element with the first element of unsorted subarray
              int temp = thelist.get(destIndex);
              thelist.set(destIndex, thelist.get(sourceIndex));
              thelist.set(sourceIndex, temp);
  
          }
      }
  </code></pre>
  
  <p>}</p>