您的位置:首页 > 其它

方法定义的完整格式

2016-07-10 10:47 281 查看
访问权限{public|default|protected|private}  [final] [static] [synchronized] 

返回值类型  方法名称(参数类型  参数名称,...) [throws Exception1, Exception2]{

[return [返回值|返回调用处]]

}

例如:

public final static synchronized String getInfo(String str) throws Exception{

return str;

}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息