As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center作为指导。
6年前关闭。
我想知道我是否应该像这样放置牙套
还是应该像这样放置它们?
女巫之一是“更好”或更常见?
6年前关闭。
我想知道我是否应该像这样放置牙套
for(int i = 0; i < 10; i++){
}
还是应该像这样放置它们?
for(int i = 0; i < 10; i++)
{
}
女巫之一是“更好”或更常见?
最佳答案
这是主观问题,不是客观问题,因此不是堆栈溢出的合适问题。
专家提示:如果您在团队中工作,您的团队应该已经同意在所有源文件中始终使用的样式。坚持下去。不要成为打开其他人的文件,将格式更改为您的首选项,然后再提交回存储库的人。迪克搬到那里,开除海事组织的理由。
进阶的专业提示:花时间担心真正重要的事情。像这样的垃圾在编程社区中流了无数的鲜血。
超级高级的技巧:one true brace style和放置括号的正确方法与第一个示例相同。这也是Java code conventions建议的准则。 😄