What is the error in the following Java-code?
<pre><code>    import java.util.*;
    class Huffman  {
        int a;
        public Huffman(int i)
        {
            a = i;
        }               
    }

    class PriorityQueueDemo implements Comparator&lt;Huffman&gt;
    {
        public int compare(Huffman ab, Huffman cd)
        {
            if(ab.a&gt;cd.a)
            {
                return 1;

            }
            return 0;
        }

        public static void main(String[] args)  
        {
            PriorityQueue&lt;Huffman&gt; HuffQueue = new PriorityQueue&lt;Huffman&gt;();

            Huffman ab = new Huffman(10);
            HuffQueue.offer(ab);
            ab = new Huffman(50);
            HuffQueue.offer(ab);
            ab = new Huffman(20);
            HuffQueue.offer(ab);
            ab = new Huffman(60);
            HuffQueue.offer(ab);


            while(HuffQueue.size() &gt; 0)
                   System.out.println(HuffQueue.remove());

            }
    }
</code></pre>

<p>What is wrong with the following Code! It generates the following <strong>exception</strong>:</p>

<pre><code>Exception in thread "main" java.lang.ClassCastException: Huffman cannot be cast to java.lang.Comparable
    at java.util.PriorityQueue.siftUpComparable(Unknown Source)
    at java.util.PriorityQueue.siftUp(Unknown Source)
    at java.util.PriorityQueue.offer(Unknown Source)
    at PriorityQueueDemo.main(Huffman.java:34)
</code></pre>
