Linked Lists and Binary Tree implementations in Java