`
modabobo
  • 浏览: 508797 次
文章分类
社区版块
存档分类
最新评论

Java中方法命名经验

 
阅读更多

Java中方法命名一般是:动词/动词性词组,首字母小写,中间单词的首字母大写,其它字母小写。

尽量应用简单的、常用的单词,示例:
get/set first/last
add/remove up/down
create/destroy min/max
start/stop next/previous
insert/delete old/new
increment/decrement open/close
show/hidebegin/end

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics