Binary Tree implemented in Java