Privacy Policy Terms Of Use. Copyright © 2006-2010 Java Tutorials and Examples.
Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.
- 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 >>

Post new comment