added linkedlist object for java