Home Java SCJP SCWCD Servlet Submit News Contact Us Site Map


Over 500 magazines for free (including Oracle Magazine)!

Yes all of them are FREE. You can subscribe to ALL of them.
Click here to apply today!

Home > Java > Java Articles

Example program of Multidimensional array

Class MultidimensionalArrayExample{

Public static void main(String args[]){

int myIntArray[][] = { {1,2},{3,4}};

for(int i = 0; i < myIntArray.length; i++){

for(int j=0; j < myIntArray[i].length; j++){

System.out.println(myIntArray[i][j]);

}
}
}

}

The above given program will print elements of multidimensional array to console.

 

<< Multidimensional Array

Anonymous Array >>


Home Java SCJP SCWCD Servlet Site map