public static void main(String[] args) {        
        Comparable<Integer>[] a = new Integer[20];
        Random r = new Random();
        System.out.println("Before Sort: ");
        for (int i = 0; i < a.length; i++) {
            a[i] = r.nextInt(50);
            System.out.print(a[i] + " ");
        }
        new HeapSort().sort(a);
        System.out.println("\nAfter Sorting");
        for (int i = 0; i < a.length; i++) {
            System.out.print(a[i] + " ");
        }
        // LinkedListQueue<Integer> d = new LinkedListQueue<>();
        // for (int i = 0; i < 10; i++) {
        // d.enqueue(i);
        // }
        // Iterator i = d.iterator();
        // while (i.hasNext())
        // System.out.println(i.next());

    }