Question: IMPLEMENT YOUR OWN LINKED LIST Create a LinkedList class that will have two variables: 1. value a. Will Store value(A String or int) 2. next
IMPLEMENT YOUR OWN LINKED LIST Create a LinkedList class that will have two variables:
1. value a. Will Store value(A String or int)
2. next a. Will store another LinkedList Object Add methods:
1. getNext() a. Should return next LinkedList object
2. getvalue() a. Should return its own value.
3. add(LinkedList toAdd) a. This LinkedList should point to toAdd b.Careful here. What if this link list is already pointing to another one/ Or what if next is not null?
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
