-4
您可以共享JLS/JEP或其他Oracle/Twitter/Google java代码样式约定文档,其中声明了类元素的位置。 像:Java代码风格:内部职位
class Example {
// public static final variables
// private static final variables
// static variables
// class variables
// constructors
// public methods
// protected methods
// inner classes
// nested classes
// static methods
// setter1
// getter1
//...
// setterN
// getterN
}
https://google.github.io/styleguide/javaguide.html – Ishnark
Google提供了一个用于查找此信息的绝佳工具。 – bradimus
这里:https://google.github.io/styleguide/javaguide.html#s3.4.2-ordering-class-contents Google写道,该类内容排序没有强烈声明。这是答案吗? –