I am trying to write an algorithm that find the smallest number after a user define the number. Say the values = {4,2,1,3}. And the user wants to find the smallest after 2, the program would shoot out 3.

Any clues or help to what to put in the body of smallestAfter??
Thanks.
Here is what I have so far: 

```
public static Comparable smallest(Comparable[] values)
{
  Comparable smallestSoFar = values[0];
  for (int i = 1; i < values.length; i++)
     if (values[i].compareTo(smallestSoFar) < 0)
        smallestSoFar = values[i];
  return smallestSoFar;
}   
 public static Comparable smallestAfter(Comparable[] values, Comparable after)
 {   
        //After a few help, this is my algorithm I personally wrote.
             Comparable smallest = smallest(values);
             Comparable largest = smallest(values);
             for(int i = 1; i < values.length; i ++){
                  if(largest.compareTo(values[i]) < 0){
                   largest = values[i];
                }
          }

    for(int i = 1; i < values.length; i ++){
        if((values[i].compareTo(smallest) > 0) && (values[i].compareTo(after)       > 0) && (values[i].compareTo(largest) < 0))
            smallest = values[i];
    }
    return smallest;

  }

```