The MyLinkedList class is a one-way directional linked list thatenables one-way traversal of the list. Modify the Node class to addthe new field name previous to refer to the previous node in thelist, as follows:
   public class Node {
     E element;
Node next;
     Nodeprevious;
     public Node(E o){
       element =o;
     }
   }
Implement a new class named MyTwoWayLinkedList that uses adoubly linked list to store elements.
Hint. The MyLinkedList class in the textextends MyAbstractList. You may define MyTwoWayLinkedList to extendthe java.util.AbstractSequentialList class. You need to implementthe methods listIterator() and listIterator(int index). Both returnan instance of java.util.ListIterator. The former sets the cursorto the head of the list and the latter to the element at thespecified index.