What is a reasonable order of Java modifiers (abstract, final, public, static, etc.)?

后端 未结 4 789
灰色年华
灰色年华 2020-11-29 16:11

What is a reasonable order of Java modifiers?

  • abstract
  • final
  • native
  • private
  • protected
  • public
  • static
4条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-11-29 16:25

    I use two rules to remember the modifier sequence, but doesn't include the strictfp, as it is never used by me. FYI.

    1. synchronized native are least priority people.

    2. PPP AS FTV: PPP {noise sound} AS {watching} FTV {France TV}.

    :)

提交回复
热议问题