Array is one of the most concept in any programming language. It is used to store homogeneous elements. They are of fixed length. The index of the array variable starts with 0. Object is the superclass of the array type. Allocation of arrays is dynamic.
There are two types of arrays:
data_type[] arrayname=new data_type[];
Example: int[] arr=new int[5];
data_type[][] arrayname=new data_type[][];
Example: int [][] arr=new int[2][3];
Knowledge2life2
Knowledge2life2
|