Difference between a static and a final static variable in Java

后端 未结 6 2001
梦谈多话
梦谈多话 2020-12-22 18:09

Generally, final static members especially, variables (or static final of course, they can be used in either order without overlapping the meaning) are extensively used with

6条回答
  •  無奈伤痛
    2020-12-22 18:41

    Just to add a minor information to @Bruno Reis 's answer, which I sought to complete the answer, as he spoke about important condition to initialize final fields before constructor ends, final static fields must also be initialized before before static blocks' execution finishes.

提交回复
热议问题