Array Archive

ArrayList in Java

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 java

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 in Java

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[0],var[1], var[2]… to represent indivisual variables. Single Dimension Array Declaring Array [crayon-5b77c5338554c135056102/] Creating Array [crayon-5b77c5338555d509803635/] Declaration and Creation in one step [crayon-5b77c53385568612093352/]