Yeah it's super minor but my IDE also flags things like this. The initial value is overwritten straight away in the loop, so initializing it is flagged as a trivial mistake. Unlike with instance variables, Java would not allow omitting the initialization of a local if it were possible to read its value before it was ever written. It's not a question of letting it rely on a default value here.