The BinaryHeap class has a rather simple implementation. In particular, it requires only a single field, array, which is declared as an array of Comparable objects. This array is used to hold the objects which are contained in the binary tree. When there are n items in the heap, those items occupy array positions 1, 2, ..., n.