开发者

To camelCase or not to camel_case

What is the standard when coding in Java, when do you use camel case when do you use 开发者_如何学Pythonunderscores etc.


You stick with the Java Code Conventions.

What exactly the standard is doesn't matter - what matters is that everyone follows it, and you should too.


ClassName

  • Renderer
  • HttpSession

methodName

  • applyTo()
  • run()

instanceVariable / localVariable

  • currentUser
  • threadList

CONSTANT_NAME

  • LOG
  • DEFAULT_CONTEXT

G (Generic Type Parameter)

  • T
  • E
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜