This is a implementation of a Heap in Java that uses an ArrayList coupled with recursion.
Give insight to new users of Java who are trying to learn data structures.
First create a heap object:
Heap h = new Heap();
Once the object has been instantiated, you can insert and delete:
h.insert(TreeNode node);
h.delete();
h.printTree();
Deleting simply returns the max node.