example of binary tree written in java