title: Custom comparator isn't sorting
body: <p>I'm trying to simulate a CPU scheduler. I have an <code>ArrayList</code> of a <code>Process</code> class I made. I'm trying to sort this array list by the arrival time of the process. I must be missing something, because when I print my <code>ArrayList</code>, nothing happens. </p>
  
  <p>I've been looking through other users posts but I haven't found anything that made sense to me.  </p>
  
  <p>Here is my <code>Comparator</code> and call to <code>sort</code>: </p>
  
  <pre><code>class ArrivalTimeComparator implements Comparator&lt;Process&gt; {
      @Override
          public int compare(Process p1, Process p2) {
          return (int) (p1.getArrivalTime()-p2.getArrivalTime());
      }
  }
  
  Collections.sort(processArray, new ArrivalTimeComparator());
  </code></pre>