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