Question: Exercise Write a method in MyLinkedList class that returns the length of the LinkedList, i . e . the number of nodes in the List.

Exercise
Write a method in MyLinkedList class that returns the length of the LinkedList, i.e. the number of nodes in the List. Test it in the main
public int count(){}
Add the necessary code to main to print the 2nd element of the list but when this is done the list should contain the same elements.
Redo 2 but this time a write method part of Mylinked list class. Test it in the main.
 Exercise Write a method in MyLinkedList class that returns the length

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!