This is a very good question.
By looking at the final reserved
word you get the impression that this is a compile time error as the final variable is getting assigned again and again. But as others mentioned already the variable gets created every time and thus compiler has no problem with this code.
People hang around here to see these type of simple yet misleading questions.
Thanks for letting us know about these traps...