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.
En esta página del sitio puede ver el video en línea Java ArrayList Methods de Duración hora minuto segunda en buena calidad , que subió el usuario Learning Point By Engineers 17 febrero 2024, comparta el enlace con amigos y conocidos, en youtube este video ya ha sido visto 71 veces y le gustó 11 a los espectadores. Disfruta viendo!