public static void main (String [] argv) {
int i, j=3;
Scanner input = new Scanner(System.in);
i = input.nextInt();
int[] arr = new int[]{i,j};
System.out.println(arr[0]+" "+arr[1]);
}
shouldn"t the above programs initialize the value of arr [] when they read int [] {iMagnej} when compiling? I should not be able to compile because I is not initialized, why can I still compile and output the correct value? Is it possible that int [] arr = new int [] {iMagnej}; is also a dynamic initialization?