I think, your source folder is not specified as a source folder. To fix this, do the following:
Go to modules(in the Project Structure
menu)
Select your source folder(likely src
)
Click on source folder
above it.
The source directory should be blue.
Save the changes(click ok to close it)
It should work.
I'm not so sure about that (its kind of a bug that sometimes happens), but try putting your mouse on the "main" in the main function and then hit ctrl + Enter and choose run.
hope this helps
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.