You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It is used to append all of the elements in the specified collection to the end of this list, in the order that they are returned by the specified collection's iterator.
55
59
```
60
+
// boolean addAll(Collection<? extends E> c)
61
+
// boolean addAll(int index, Collection<? extends E> c)
62
+
56
63
ArrayList<String> letters = new ArrayList<>();
57
64
letters.add("A");
58
65
letters.add("B");
@@ -101,7 +108,7 @@ cars.size();
101
108
### `sort()`
102
109
103
110
- Sort an ArrayList in `Ascending Order`
104
-
Another useful class in the java.util package is the Collections class, which include the sort() method for sorting lists alphabetically or numerically:
111
+
Another useful class in the java.util package is the `Collections class`, which include the sort() method for sorting lists alphabetically or numerically:
105
112
```
106
113
ArrayList<String> cars = new ArrayList<String>();
107
114
cars.add("Volvo");
@@ -116,4 +123,63 @@ ArrayList<String> cars = new ArrayList<String>();
0 commit comments