Lecture Videos
  1  public class SortRectangles {
  2    public static void main(String[] args) {
  3      ComparableRectangle[] rectangles = {
  4        new ComparableRectangle(3.4, 5.4), 
  5        new ComparableRectangle(13.24, 55.4),
  6        new ComparableRectangle(7.4, 35.4),
  7        new ComparableRectangle(1.4, 25.4)};
  8      java.util.Arrays.sort(rectangles);
  9      for (Rectangle rectangle: rectangles) {
 10        System.out.print(rectangle + " "); 
 11        System.out.println();
 12      }
 13    }
 14  }