Advertisement
mmic162

Untitled

May 6th, 2019
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. {
  2.  
  3. int [][][][] intArray4D= new int [1][1][1][2];
  4.  
  5. intArray4D [0][0][0][1] = 5;
  6.  
  7. adresseAusgeben(intArray4D);
  8.  
  9. }
  10.  
  11. private static void adresseAusgeben(int[][][][] intArray4D) {
  12.  
  13. for(int y=0; y<intArray4D.length; y++ ) {
  14. for(int x=0; x<intArray4D[y].length; x++ ) {
  15. for(int z=0; z<intArray4D[y][x].length; z++ ) {
  16. for(int a=0; a<intArray4D[y][x][z].length; a++ ) {
  17. if(intArray4D[y][x][z][a] == 5)
  18. System.out.println("y="+y+" x="+x+" z=" +z+" a="+a );
  19. // System.out.println(intArray4D[y][x][z][a]);
  20. }
  21. }
  22. }
  23. }
  24.  
  25.  
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement