What the difference between Arraylist and list | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

What the difference between Arraylist and list

What the difference between Arraylist and list Arraylist<String> arraylist = new Arraylist<>() list<String> list = new Arraylist<>()

21st Mar 2019, 9:42 PM
Андрей Кропинов
Андрей Кропинов - avatar
2 Answers
+ 1
ArrayList es un contenedor de una colección, mientras un list es directamente una colección.
21st Mar 2019, 9:57 PM
Divier Bula
Divier Bula - avatar
+ 1
List (https://docs.oracle.com/javase/8/docs/api/java/util/List.html) is an interface while ArrayList (https://docs.oracle.com/javase/8/docs/api/java/util/ArrayList.html) is one of the possible implementations of the List interface.
21st Mar 2019, 9:58 PM
Jorge
Jorge - avatar