public void trimToSize()
Trims the capacity of this ArrayList instance to be the list's current size. An application can use this operation to minimize the storage of an ArrayList instance.
ensureCapacity
public void ensureCapacity(int minCapacity)
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.
Parameters:
minCapacity - the desired minimum capacity
size
public int size()
Returns the number of elements in this list.
Specified by:
size in interface Collection
Specified by:
size in interface List
Specified by:
size in class AbstractCollection
Returns:
the number of elements in this list
isEmpty
public boolean isEmpty()
Returns true if this list contains no elements.
Auf dieser Seite können Sie das Online-Video Java ArrayList Methods mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer Learning Point By Engineers 17 Februar 2024 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 71 Mal angesehen und es wurde von 11 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!