Array Initialization Doubt
posted 8 years ago
Static means that the member variable is created and initialized when the class is loaded by the Java interpreter. Final means that the value cannot be changed after it is initialized. The static initialization block in line 1 is called when the class is loaded. The class has already been loaded by the timeLine 2 attempts to initialize the array in a method, and therefore is illegal to attempt to change the value of the final variable.