1  /**
  2     This program demonstrates the heapsort algorithm.
  3  */
  4  public class HeapSortDemo
  5  {  
  6     public static void main(String[] args)
  7     {  
  8        int[] a = ArrayUtil.randomIntArray(20, 100);
  9        ArrayUtil.print(a);
 10        HeapSorter sorter = new HeapSorter(a);
 11        sorter.sort();
 12        ArrayUtil.print(a);
 13     }
 14  }