Add implementation of linkedlist code in java