title: Selection Sorting with ArrayLists
body: <p>I have an arrayList of Students in my main class called S... of objects type student. In "s", i need to  sort my Students in my arrayList "S" by the registrationNumber they have, smaller to higher. </p>
  
  <p>I tried many ways, but cannot get it to work...</p>
  
  <pre><code>public static void sort(){
              int small;
              for (int i=0; i &lt; s.size() -1;i++){
              small = i;
                  for (int ind = i + 1; ind&lt; s.size(); ind++ ){
                  if( stud.get(ind).getRegNum() &lt; s.get(small).getRegNum() ){
                      small = ind;
                      swap(i, small);
                  }
              }
            }
         }
  
        public static void swap(int one,int two){
              }
  </code></pre>