When is it appropriate to use blank final variables?

前端 未结 9 1389
野趣味
野趣味 2020-12-16 00:24

I was looking at another question about final variables and noticed that you can declare final variables without initializing them (a blank final variable). Is there a reaso

9条回答
  •  北海茫月
    2020-12-16 01:12

    noticed that you can declare final variables without initializing them

    You have to initialize it later (for example in the constructor) so it wont stay empty.

提交回复
热议问题