class Leaf { // Leaf node of a Huffman tree. char ch; // the character represented by this node. int frequency; // frequency of char in the message. public Leaf(char c, int freq) { ch = c; frequency = freq; } }