问题描述
过去几天,我一直在引用Sun的文档中的这一部分,直到现在我才停下来思考一下它在说什么,我对此一无所知.请记住,英语不是我的母语.
I've been quoting this segment from Sun's document for the past few days, and only now do I stop and think about what it's saying, and I can't make any sense of it. Please keep in mind that English is not my first language.
这有什么道理?这不是说类名是大小写混合的首字母吗?就像我应该将其命名为class myClass
吗?而且类常量也与小写的首字母混合使用吗?像是代替Integer.MAX_VALUE
一样,应该将其命名为integer.maxValue
?
How is this making sense? Isn't this saying that class names are in mixed case with a lower-case first letter? Like I should name it class myClass
? And class constants are also in mixed case with a lower-case first letter? Like instead of Integer.MAX_VALUE
, it should've been named integer.maxValue
?
这真的是在说变量本身应该如何命名吗?
And is it really saying anything about how variables themselves should be named?
我无法正确解析吗,或者这实际上是公然的错误吗?
Am I not parsing this properly or is this actually a blatant error?
推荐答案
Sun已将其作为 bug 接受,但优先级较低:
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id= 4311597
Sun has accepted this as a bug, with low priority:
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4311597
文字应为:
所有实例变量和类变量混合在一起..."
"All instance and class variables are in mixed..."
因此删除变量除外"和类常量"一词
thus dropping the words "except for variables" and "class constants"
这篇关于这句话有什么道理? (Sun对Java变量的命名约定)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!