Java LinkedList class is doubly-linked list implementation of the List and Deque interfaces.
Properties:
--Permits all elements including duplicates and NULL.
--LinkedList maintains the insertion order of the elements.
--It is not synchronized.
--the manipulation is fast because no shifting is required.
How to create:
LinkedList<String> linkedList = new LinkedList<>();
Methods: boolean add(Object item), void add(int index, Object item), boolean addAll(Collection c), void addFirst(Object item), void addLast(Object item), void clear(), Object clone(), Object getFirst(), Object getLast(), Object poll() etc.
To get more details please watch below youtube video and Subscribe the channel.
Single and Doubly Linked List |
--Permits all elements including duplicates and NULL.
--LinkedList maintains the insertion order of the elements.
--It is not synchronized.
--the manipulation is fast because no shifting is required.
How to create:
LinkedList<String> linkedList = new LinkedList<>();
Methods: boolean add(Object item), void add(int index, Object item), boolean addAll(Collection c), void addFirst(Object item), void addLast(Object item), void clear(), Object clone(), Object getFirst(), Object getLast(), Object poll() etc.
To get more details please watch below youtube video and Subscribe the channel.
No comments:
Post a Comment