Array or ArrayList | Sololearn: Learn to code for FREE!
Новый курс! Каждый программист должен знать генеративный ИИ!
Попробуйте бесплатный урок
+ 1

Array or ArrayList

Is this got different function between array and arraylist? When should we use array and when should we use arraylist?

28th Sep 2017, 9:14 AM
Why Xiong Chee
Why Xiong Chee - avatar
1 ответ
+ 10
An array is static, meaning that you can't put more values to it once it is initialised. An array list can be extended dynamically (down in the API the stuff with putting everything to a new bigger array is handled for you, so you don't need to take care of this).
28th Sep 2017, 11:16 AM
Tashi N
Tashi N - avatar