public class Test1 {
public static void main () {
int N = 10;
int M = 100000;
for(int i =0; i< N; i++) {
int[] box = new int[M];
}
}
}
Will this code cause cause the memory to be allocated for the array with size equal to M elements for each iteration of the for loop?