16/01/25 ---------- Arrays in Java ---------------- Q)What is an array? =>An indexed collection of elements of same data type stored in contiguous memory locations is nothing but an array. Q)What are the characterstics of an array in Java? 1)Every element of an array has a common name(of course with different index). 2)an array is an object in Java. 3)Every array has a property known as "length". It gives you the size of the array 4)boundary checking is there for an array in Java. 5)Lower bound(first index) of an array is 0 and the upper bound(last index) is N-1 where N is the size of the array Q)How to create an array in a Java application? [] =new [SIZE]; OR [] =new [SIZE]; OR [] =new [SIZE]; For eg. int a[]=new int[5];//An integer array of size 5 created. OR int []a=new int[5]; OR int[] a=new int[5]; Q)How to initialize an array? For eg. int a[]={10,20,30,40,50};