0
Arrays and lists/ Java
Ok, I AM NEW TO JAVA AND, (SORRY IF THIS SEEMS YELLING) IdK WHAT IS ARRAYS AND LISTS. I KNOW THAT LISTS ARE HERE TO ORDER, LIKE 123, OR ABCS. BUT WHAT DO ARRAYS DO? I HaVE NO IDEA, AND, ALWAYS THX FOR YOUR TIME TO ANSWER.
5 Answers
+ 4
Array is a fixed length data structure whereas ArrayList is a variable length Collection class. We cannot change length of array once created in Java but ArrayList can be changed. We cannot store primitives in ArrayList, it can only store objects. But array can contain both primitives and objects in Java
0
variable stores one value;
array or list can store more values of the same type and usually same purposes, eg list of students, list of books, words, characters, numbers. then you can fast address the value, change it, and easy iterate all vales.