开发者

Java naming convention with acronyms [duplicate]

This question already has answers here: 开发者_开发百科 Closed 11 years ago.

Possible Duplicate:

Java Naming Convention with Acronyms

Is it getXml() or getXML()? Is there any official Sun/Oracle document on this?


You'll find both in the Java Standard API, so if there is a convention, it's not being widely followed.


Both are correct. Use your preferred way, and be consistent with it throughout your code.


Not specified

Except for variables, all instance, class, and class constants are in mixed case with a lowercase first letter. Internal words start with capital letters. Variable names should not start with underscore _ or dollar sign $ characters, even though both are allowed.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜