Java语言规范的修饰符顺序
The Java Language Specification recommends listing modifiers in the following order:
Java语言规范建议按以下顺序列出修饰符:
- Annotations
- public
- protected
- private
- abstract
- static
- final
- transient
- volatile
- synchronized
- native
- strictfp
Not following this convention has no technical impact, but will reduce the code's readability because most developers are used to the standard order.
不遵循此约定没有技术上的影响,但会降低代码的可读性,因为大多数开发人员习惯于标准顺序。