Standard java arrays size is fixed. Once the arrays are created, they can not grow or shrink which means you can not change the size of the array. You must now the requirement of your program to initialize the array of required size. To overcome such limitations, java provides the ArrayList class that can store
Array of Objects : In our previous article Arrays in java, we discussed array of primitive data types as a very useful and power ful tool. Java also allows you to declare array of objects which is more useful and powerful (logically & cleanly) tool.
Arrays are used to store collection of data. In other words, arrays are collection of variables stored under one name by manipulating indexes. Instead of declaring var1, var2, var3… you can declare one array var,var, var… to represent indivisual variables. Single Dimension Array Declaring Array dataType arrayRefVar; or dataType arrayRefVar; int mylist; or int mylist; Creating