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
Copy file name to clipboardExpand all lines: _posts/collections/arraylist/2021-11-24-arraylist-in-java.md
+5-3Lines changed: 5 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -93,11 +93,11 @@ By default, Collections are heterogeneous i.e. they can save all types of object
93
93
|[`set(int index, E element)`](https://coderolls.com/change-element-in-arraylist/)|This method sets the sepecified element at the specifed `index`.|
94
94
|[`remove(Object o)`](https://coderolls.com/remove-element-from-arraylist/)|This method removes the specified object from the ArrayList.|
95
95
|[`remove(int index)`](https://coderolls.com/remove-element-from-arraylist/)|This method removes the object at specified index from the ArrayList.|
96
-
|`removeIf(Predicate filter)`|This method removes all of the elements of the ArrayList that satisfy the given predicate.|
97
-
|`removeAll(Collection c)`|This method removes from this list all of its elements that are contained in the specified collection.|
96
+
|[`removeIf(Predicate filter)`](http://coderolls.com/arraylist-removeif-method/)|This method removes all of the elements of the ArrayList that satisfy the given predicate.|
97
+
|[`removeAll(Collection c)`](http://coderolls.com/arraylist-removeall-method/)|This method removes from this list all of its elements that are contained in the specified collection.|
98
98
|[`iterator()`](https://coderolls.com/remove-element-from-arraylist/)|This method provides the Iterator to iterate over an ArrayList.|
99
99
|[`clear()`](http://coderolls.com/arraylist-clear-method-in-java/)|This method removes all the elements from the list and makes it empty.|
100
-
|`isEmpty()`|This method returns true if this list contains no elements.|
100
+
|[`isEmpty()`](http://coderolls.com/arraylist-isempty-method/)|This method returns true if this list contains no elements.|
101
101
|[`contains()`](http://coderolls.com/arraylist-contains-method/)|This method is used for checking if the specified element exists in the given list or not.|
102
102
|[`toArray()`](http://coderolls.com/convert-arraylist-to-array/)|This method returns an array containing all of the elements in this ArrayList in proper sequence.|
103
103
|[`toArray(T[] a)`](http://coderolls.com/convert-arraylist-to-array/)|This method returns `T []` i.e. An array of the specified type `T` can be returned.|
@@ -106,6 +106,8 @@ By default, Collections are heterogeneous i.e. they can save all types of object
106
106
|[`trimToSize()`](http://coderolls.com/arraylist-trimtosize-method/)|This method trims the capacity of this ArrayList instance to be the list's current size.|
107
107
|[`indexOf(Object o)`](http://coderolls.com/arraylist-indexof-method/)|This method returns the index of the first occurrences of the object specified. It returns -1 if the specified object `o` is not present in the list.|
108
108
|[`lastIndexOf(Object o)`](http://coderolls.com/arraylist-lastIndexof-method/)|This method returns the index of the last occurrences of the object specified. It returns -1 if the specified object `o` is not present in the list.|
109
+
|[`ensureCapacity()`](http://coderolls.com/arraylist-ensurecapacity-method/)|This method increases the capacity of this ArrayList instance, if necessary, to ensure that it can hold at least the number of elements specified by the minimum capacity argument.|
110
+
|[`listIterator()`](http://coderolls.com/arraylist-listiterator-method/)|This method returns a *fail-fast* list iterator over the elements in this list (in proper sequence).|
Copy file name to clipboardExpand all lines: _posts/collections/arraylist/2022-01-05-arraylist-listiterator-method.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -27,7 +27,7 @@ There are two variations of the `listIterator()` method.
27
27
28
28
## 1. ArrayList `listIterator()` method
29
29
30
-
The `listIterator()` method returns a list iterator over the elements in this list (in proper sequence).
30
+
The `listIterator()` method returns a list iterator over the elements in this list (in proper sequence).
31
31
32
32
The returned list iterator is [*fail-fast*](https://docs.oracle.com/javase/8/docs/api/java/util/ArrayList.html#fail-fast). i.e When multiple threads try to uodate the list at a time, it will throw the `ConcurrentModificationExaception`.
0 commit comments