IDEA stuck at compiling if I used java.util.Scanner in my main() method
I am learning how to use IDEA and I've successfully run the Hello World java project following the tutorial.
So I started to write some simple program with java.util.Scanner involved, but the IDE stuck at pre-load stage.
Once I remove the code related to java.util.Scanner, everything worked just fine.
IntelliJ IDEA 2022.1.2 (Community Edition)
Build #IC-221.5787.30, built on June 1, 2022
Runtime version: 11.0.15+10-b2043.56 x86_64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
macOS 12.4
GC: G1 Young Generation, G1 Old Generation
Memory: 2048M
Cores: 8
Non-Bundled Plugins:
com.intellij.STAintellij.intellij_plugin (22.5.258)
gherkin (221.5787.15)
cucumber-java (221.5787.20)
cucumber-groovy (221.5787.20)
Kotlin: 221-1.6.21-release-337-IJ5787.30


请先登录再写评论。
If you put the caret right below the first line in the output area and type in e.g. "100", it will output "100" and finish running (you will see "Process finished with exit code 0" at the end, which is a success message).