Přidat otázku mezi oblíbenéZasílat nové odpovědi e-mailemVyřešeno Java - ArrayList - Lze nastavit maximální počet prvků?

Each ArrayList instance has a capacity. The capacity is the size of the array used to store the elements in the list. It is always at least as large as the list size. As elements are added to an ArrayList, its capacity grows automatically. The details of the growth policy are not specified beyond the fact that adding an element has constant amortized time cost.

https://docs.oracle.com/javase/8/docs/api/java/util/ArrayList.html

Jedná se o prvotní velikost pole, ve kterém se elementy ukládají.

Reakce na odpověď

1 Zadajte svou přezdívku:
2 Napište svou odpověď:
3 Pokud chcete dostat ban, zadejte libovolný text:

Zpět do poradny