Declare final variable, but set later

后端 未结 7 1545
梦毁少年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:24

    NO it can not be done

    if you can declare final at one place and initialize it later, Then What is the mean of final.

    If you want to have a constant ID, why don't you use Shared Preferences , store it in SP and retrieve whenever want.

    0 讨论(0)
提交回复
热议问题