Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

tableau deux dimensions java

                  //Two dimensional arrays

//example of a declaration
int[][] w=new int[3][4] ;

int[][] tab={ {1,2,3,4},{5,6,7,8},{9,10,11,12} };

//display
    for(int i=0;i<3;i++){
       for(int j=0;j<4;j++){
         System.out.print(tab[i][j]+" ");
       } System.out.println();
    }

/*
1 2 3 4 
5 6 7 8 
9 10 11 12 
*/
 
PREVIOUS NEXT
Tagged: #tableau #deux #dimensions #java
ADD COMMENT
Topic
Name
8+6 =