java的类定义

[public] [abstact|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
}
}

posted @ 2025-01-02 18:11  Grit_Doyle  阅读(12)  评论(0)    收藏  举报