This is Java Programming
Linked List Basics ( insertFront, insertBack, deleteFront & deleteBack)Question: Given the following code in main and output, please write the Java program which allows main to work:
public static void main(String[] args) {LinkedList list = new LinkedList();
// Try to delete from an empty listlist.deleteFront();list.displayLL();list.deleteBack();list.displayLL();// insert 3 nodeslist.insert(18);list.insert(45);list.insert(12);list.displayLL();
// Here are the main “new” lines, not included in code I gave youlist.insertFront(1);list.displayLL();list.insertBack(999);list.displayLL();list.deleteFront();list.displayLL();list.deleteBack();list.displayLL();} // end of main
This is Java programming please
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here