Question: in java Write a method called printList() and add it to class SinglyLinkedList. This method is used to output the elements of the linked list.
in java Write a method called printList() and add it to class SinglyLinkedList. This method is used to output the elements of the linked list. Then write a main program to create a linked list and test the printList method above (sample output is shown below)

Output - SLProblem 1 (run) run: Calling myList.addFirst (10) Calling myList.addLast (20) Calling myList.addFirst (30) Printing list 30 10
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
