Java   View all facts   Glossary   Help
object > array
Next objectcurrent object    Upobject    Previous objectuninitialized object   

array comparison table
Subject have example initialize automatically create by
array of numbers
//the following sums all the elements of an integer array:
for(int i = 0; i < anIntArray.length; i++)
{
sum += anIntArray[i];
}
so that every element has the value 0
  • declaring and initializing it such that it is created whenever execution enters a particular block, or, in the case of an instance variable, when an instance is created, for example:
    String aString = "some text";
  • or by declaring it and initializing it later using the new operator, for example:
    String aString;
    aString = new String("some text");
multidimensional array
An array of the days of the year grouped into weeks
int[][] dayValue = new int[52][7]
 declaring an array of arrays

Next objectcurrent object    Upobject    Previous objectuninitialized object