Java完整的类定义
[public] [abstract|final] class className [extends superclassName]
[implements InterfaceNameList]{//类声明
[public|protected|private][static][final][transient][volatile] type variableName;
//成员变量声明
[public|protected|private][static][final|abstract][native][synchronized] returnType methodName([paramList])
//方法定义及实现
[throws exceptionList]{
statements
}//抛出异常
}
转载自:唐大仕 Java程序设计 https://www.icourse163.org/course/PKU-1001941004