Adding java example for comparison for tree challenge