8000 Update README.md · ruturajjadhav07/Java@01bb9e3 · GitHub
[go: up one dir, main page]

Skip to content

Commit 01bb9e3

Browse files
Update README.md
1 parent 04a1203 commit 01bb9e3

File tree

1 file changed

+28
-1
lines changed
  • Java Core/Java Collection Framework/List/Linkedlist

1 file changed

+28
-1
lines changed
Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,29 @@
11
# Linkedlist
2-
*LinkedList is a class in Java that implements the List interface.*
2+
*"LinkedList is a class that implements the List interface in Java. It utilizes a doubly linked list structure to store elements. Each element is stored as a separate object (node) with references to both the previous and next nodes in the list.*
3+
4+
*LinkedList allows for the storage of duplicates of various data types. Elements stored in a LinkedList can be accessed sequentially or iteratively, as well as efficiently added or removed from the beginning, end, or middle of the list.*
5+
6+
*Unlike arrays, LinkedList does not require a contiguous block of memory, and the size of the LinkedList can vary dynamically as elements are added or removed.*
7+
8+
## There are many methods related to ArrayList Here are most common that are used
9+
10+
### add(E element):
11+
* Adds the specified element to the end of the list.
12+
13+
### addFirst(E element):
14+
* Inserts the specified element at the beginning of the list.
15+
16+
### addLast(E element):
17+
* Appends the specified element to the end of the list. This method is equivalent to add(E element).
18+
19+
### getFirst():
20+
* Retrieves the first element in the list.
21+
22+
### getLast():
23+
* Retrieves the last element in the list.
24+
25+
### removeFirst():
26+
* Removes and returns the first element from the list.
27+
28+
### removeLast():
29+
* Removes and returns the last element from the list.

0 commit comments

Comments
 (0)
0