Home > database >  I messed up in Run/Debug Configuration and now unable to run a single line of code with IntelliJ
I messed up in Run/Debug Configuration and now unable to run a single line of code with IntelliJ

Time:12-13

Here is the screen. Please tell me how to solve this.

enter image description here

And here it is saying main method is not found but I already written that in the class.

enter image description here

I tried to edit the configuration and messed it up. How do I fix this?

CodePudding user response:

You have a class named String in your project. That class shadows the class java.lang.String.

That means that you must either write your main method as

public static void main(java.lang.String...args) {
}

or rename your class String to something else.

  • Related