View RSS Feed

Java Array

Java arrays.

  1. Declaring a Variable to Refer to an Array

    by , 03-04-2012 at 10:02 AM
    Array is declared in the above program along with this line of code.
    Java Code:
    // declares an array of integers
    int[] anArray;
    Array declaration also consists of 2 components, just like other declarations for other types of variables. They are
    • Array’s name
    • Array’s type


    Array’s type is written as type[].

    An array’s name could be anything that you may want provided it follows the conventions. Just like other type variables, array ...
    Tags: refer array Add / Edit Tags
    Categories
    Add