250 likes | 400 Views
Review of arrays. an array is a contiguous area of memory that holds multiple items of a single typeThe declaration of an array is of the form datatype[] namethe array constructor is of the form new datatype(int n)example: int[] primes = new int(20);arrays can be of any data type (primitive like int, or class like String), but all elements of the array are of the same data type.
E N D