java类包括成员变量和成员方法,那常量呢?常量也属于成员变量?
高洛峰
高洛峰 2017-04-18 10:44:58
0
2
828
高洛峰
高洛峰

拥有18年软件开发和IT教学经验。曾任多家上市公司技术总监、架构师、项目经理、高级软件工程师等职务。 网络人气名人讲师,...

reply all (2)
左手右手慢动作
  • Member xx corresponds to class xx. For example, member variables and class variables are non-statically modified and statically modified in a class.

  • Constants can be divided into member constants and class constants, just check whether there is static modification

    黄舟

    There is a definition of final Variables in the Java language specification, and onlyfinal修饰的变量应该就叫做final变量is used in examples.

    staticfinalIt is called a constant if it is modified at the same time.
    The Java specification is defined as follows

    static variables that are final and that are initialized with compile-time constant values are initialized first. This also applies to such fields in interfaces (§9.3.1). These variables are "constants"

      Latest Downloads
      More>
      Web Effects
      Website Source Code
      Website Materials
      Front End Template
      About us Disclaimer Sitemap
      php.cn:Public welfare online PHP training,Help PHP learners grow quickly!