Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {
- int [][][][] intArray4D= new int [1][1][1][2];
- intArray4D [0][0][0][1] = 5;
- adresseAusgeben(intArray4D);
- }
- private static void adresseAusgeben(int[][][][] intArray4D) {
- for(int y=0; y<intArray4D.length; y++ ) {
- for(int x=0; x<intArray4D[y].length; x++ ) {
- for(int z=0; z<intArray4D[y][x].length; z++ ) {
- for(int a=0; a<intArray4D[y][x][z].length; a++ ) {
- if(intArray4D[y][x][z][a] == 5)
- System.out.println("y="+y+" x="+x+" z=" +z+" a="+a );
- // System.out.println(intArray4D[y][x][z][a]);
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement