Reputation: 41
I created a project unchecked (Create project form template) and added new class named demo. but when after compiling, I couldn't run the code intellij didin't show me result. "Edit configuration" only appeared like this:
I don't know what to do :( I saw someone run the code using Intellij without writing package. So I don't think that it doesn't work because I didn't write package. What can I do?
Upvotes: 2
Views: 5948
Reputation: 864
Add the args
parameter to the main
method. Then right click into the editor -> and select "Run demo.main()"
Upvotes: 0
Reputation: 4883
You are missing the String[] args parameter in your main method:
public static void main(String[] args) {
}
Upvotes: 5