[英]Cannot resolve symbol 'println' in intellij
I cannot seem to get rid of "cannot resolve println symbol in intellij", what i have tried:-我似乎无法摆脱“无法解析 intellij 中的 println 符号”,我尝试过:-
Below are the screenshots:-以下是截图:-
Edit:- I got worked up only to find myself being caught in an error caused due to a closing brace.编辑:-我很生气,只是发现自己因右括号而陷入错误。 Also thanks whoever tried to help!
也感谢任何试图帮助的人!
You have the method call directly inside the class body, not inside the main method as your main method body is already closed with }
.您可以直接在 class 主体内部进行方法调用,而不是在主要方法内部,因为您的主要方法主体已经用
}
关闭。
You may want to disable IDE code folding to avoid such problems in the future:您可能希望禁用 IDE 代码折叠以避免将来出现此类问题:
Settings (Preferences on macOS) |设置(macOS 上的首选项)| Editor |
编辑 | General |
一般 | Code Folding |
代码折叠 | One-line methods.
一条线的方法。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.