Java Collections Tutorial 02 | List - ArrayList in Java | Java9s.com

preview_player
Показать описание
List is an ordered collection. It arranges its elements in a sequence with an index. A list is very similar to an Array except that an Array cannot expand in size but a list can expand when and then we try to insert a new element.
ArrayList is the concrete implementation of the Collection and List interfaces.
ArrayList is the most frequently used Collection. So, if you notice the methods with an index in the method signature, then they are added by the List interface and most of the other methods you see are from the Collection interface.
Please remember that most of these methods are common in other collection types like Set and Queue.
Рекомендации по теме
Комментарии
Автор

In case of clone, Is it deep copy or references are copied?

smarttrupti
Автор

Why not use a for each loop for Lists instead?

Stonecoldsteverock
Автор

Very clear explanation. Easy to follow. Thank you so much

extracurrycooler
Автор

Sir, for clone() do we need to type cast the instance into ArrayList<Car>?

Mrquak
Автор

Very good idea with good and bad practice part! Keep up the great work. Many thanks.

marks
Автор

hi Sir
your teachings are just awesome
please clarify the code
I didn't get this line what exactly it is

mramya
Автор

the font size is very small.
it is not comfortable to watch mobiles.
could you use large font in coming videos

Tirupathi
Автор

Kindly use different font, this looks terrible..

ckbapps