Java Array vs ArrayList
Summary: This tutorial "Java Array vs ArrayList", tables you the differences between array and arraylist at a glance to remember easily.
Following table gives the differences of Java Array vs ArrayList
|Stores primitive data types and also objects||Stores only objects|
|Defined in Java language itself as a fundamental data structure||Belongs to collections framework|
|Fixed size||Growable and resizable. Elements can be added or removed|
|Stores similar data of one type||Can store heterogeneous data types|
|It is not a class||It is a class with many methods|
|Cannot be synchronized||Can be obtained a synchronized version|
|Elements retrieved with for loop||Can be retrieved with for loop and iterators|
|Elements accessible with index number||Accessing methods like get() etc. are available|
|Can be multidimensional||—|
For extra reading of differences between various Java entities:
Pass your comments and suggestions to improve the quality of this Web site in this tutorial "Java Array vs ArrayList".