The only scenarios that use defaut values are when the corresponding variables are object fields or even local components of the array. Indeed, ALWAYS arrays initialize their cells with the appropriate default values.
Thus, in your case, your variable does not come from the field (since it is local to the method) and did not participate in the initialization of the array. Therefore, the compiler logically complains.
source share