method for the GENERIC MyLinkedList class that will manipulate the linked list code example
Example: how to declare a linked list in java
LinkedList<String> list=new LinkedList<String>();
LinkedList<String> list=new LinkedList<String>();