In the below pic contains the structure of 3D array that I want to create
I have 5 Flight with numbers 777,747,777,747
and 777
.
I want to create a 2D array with size 5*3
if the flight = 777
and a 2D array with size 10*5
if flight = 747.
int seat[][][] = new int [5][][];
int flight = 0;
while (flight < 5) {
if (Boeing_Number[flight] == 777) {
seat = new int[flight][5][3];
}
else if (Boeing_Number[flight] == 747) {
seat = new int[flight][10][5];
System.out.println(" created ");
}
flight++;
}