开发者

To camelCase or not to camel_case

开发者 https://www.devze.com 2022-12-16 12:26 出处:网络
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 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

精彩评论

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