File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
Section9ArrayAB/Array IMP Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -6,12 +6,12 @@ Definition
66
77- List (ArrayList/LinkedList): A dynamic collection that can grow or shrink in size.
88
9- It is part of Java’s ` java.util` package and allows flexible manipulation of elements.
9+ It is part of Java’s java.util package and allows flexible manipulation of elements.
1010
1111 `ArrayList` provides fast access, while `LinkedList` is optimized for frequent insertions/deletions.
1212
1313
14- Array vs. List in Java (Short Theory) :
14+ Array vs. List in Java:
1515
1616| Feature | Array | List (ArrayList/LinkedList) |
1717|-----------------------|-------------------------------------------|----------------------------------------------------------------------------|
@@ -22,6 +22,6 @@ Array vs. List in Java (Short Theory):
2222| Implementation | int[] arr = new int[5]; | List<Integer> list = new ArrayList<>(); |
2323| Best For | When size is known & fixed | When frequent insertions/deletions are needed |
2424
25- 👉 Use Array when performance & fixed size matter.
26-
27- 👉 Use List when flexibility & dynamic resizing are needed.
25+
26+ Use Array when performance and fixed size matter.
27+ Use List when flexibility and dynamic resizing are needed.
You can’t perform that action at this time.
0 commit comments