Declare final variable, but set later

后端 未结 7 1573
梦毁少年i
梦毁少年i 2020-12-09 01:49

I know this is fairly simple topic, but I really want to wrap my head around it.

This is what I\'m trying to do, but it doesn\'t like the final modifier. Is there an

7条回答
  •  执念已碎
    2020-12-09 02:23

    you have to initialize the constructor as soon as you create it, or you could initialize it at the max, in the constructor. Not later than that..

提交回复
热议问题