View RSS Feed

Java Array

Java arrays.

  1. Multidimensional arrays

    by , 03-04-2012 at 11:24 AM
    Array of arrays also consists of multi dimensional arrays. Multi-dimensional variables could be declared by specifying the every extra index. This is done by using square bracket set.
    Java Code:
    For example: 
    int myArray[ ][ ] = new int[5][6] ;
    In case of a multi-dimensional array, memory is allocated by specifying memory for leftmost (1st) dimension.

    Rest of the dimensions can be allocated separately.

    In multi-dimensional array, every array’s ...