Untitled

mail@pastecode.io avatar
unknown
plain_text
2 years ago
916 B
1
Indexable
Never
package array3d;

import java.util.Scanner;

/**
 *
 * @author student
 */
public class Array3D {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        Scanner input=new Scanner(System.in);
        int[][][] arr=new int[2][3][3];
        System.out.println("Enter array element:");
        for(int i=0;i<arr.length;i++){
            for(int j=0;j<arr[i].length;j++){
                for(int k=0;k<arr[i][j].length;k++){
                arr[i][j][k]=input.nextInt();
                }
            }
        }
        for(int i=0;i<arr.length;i++){
            for(int j=0;j<arr[i].length;j++){
                for(int k=0;k<arr[i][j].length;k++){
                System.out.print(arr[i][j][k]+" ");
                }System.out.println("");
            }System.out.println("*********");
            
        }
    }
    
}