Linked List implementation in Java [Netbeans]