Hello All,
I though I was on the right track to fix this problem but then I get the requirements are not being met. I then realized only 2 - 9 is being output. How do i fix this ?
package en.codegym.task.pro.task13.task1313;
/*
StringLinkedList
It's time to get acquainted with doubly linked lists.
By solving this task,
you will understand how a doubly linked list works and
you'll be able to add elements to it.
You have a StringLinkedList class, which has first and
last fields that point to the first and last elements respectively.
You need to implement the logic of the add method,
which will add elements to the list.
*/
public class Solution {
public static void main(String[] args) {
StringLinkedList stringLinkedList = new StringLinkedList();
stringLinkedList.add("1");
stringLinkedList.add("2");
stringLinkedList.add("3");
stringLinkedList.add("4");
stringLinkedList.add("5");
stringLinkedList.add("6");
stringLinkedList.add("7");
stringLinkedList.add("8");
stringLinkedList.add("9");
stringLinkedList.printAll();
}
}