JAVA修饰符优先级先后顺序规范
在实际的开发中,会遇到定义静态常量时,有的人使用的修饰符顺序不一致,例如
或者
于是找到了下规范,分享下
| 优先级 | 修饰符 |
|---|---|
| 1 | Annotations |
| 2 | public |
| 3 | protected |
| 4 | private |
| 5 | abstract |
| 6 | static |
| 7 | final |
| 8 | transient |
| 9 | volatile |
| 10 | synchronized |
| 11 | native |
| 12 | strictfp |
转载自:https://www.cnblogs.com/SeanYoung/p/13496219.html

浙公网安备 33010602011771号