我想在 IntelliJ 中将花括号添加到单行语句中。
可以说我有:
if(x)
print(y)
我希望 IntelliJ 自动将其格式化为:
if(x){
print(y)
}
最佳答案
File -> Settings -> Editor -> Code style -> Java -> Wrapping and braces -> if/while/for() statement -> Force braces -> Always
关于java - 在 IntelliJ for Java 中自动将大括号添加到单行 if/for/while 等语句中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59685766/