Java static initialization problem

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?

Mar.23,2021
Isn't the sentence

I = input.nextInt ();
equivalent to initialization?
if this sentence does not definitely report an initialization exception, this sentence means that the value of I is uncertain at compile time.


Java language specification find out:

), and may be assigned to variables of type Object. dynamically created by In the Java programming language, arrays are objects, are dynamically created ( All methods of class Object may be invoked on an array.

I is a local variable

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3a69d-2c216.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3a69d-2c216.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?