Jave code says main method not found on changing Java class file name [closed]

Multi tool use
Multi tool use


Jave code says main method not found on changing Java class file name [closed]



I used a single Java file with multiple classes (4).
Then I changed the file name to Hi.java, same as the public main method name.
On compiling, it said main method cannot be found.
Please help resolve why Java does not allow renaming the file name after developing the code.



Thanks



This question appears to be off-topic. The users who voted to close gave this specific reason:





would be nice to see the code
– nicksheen
Jul 1 at 16:51






filename should be same as class name which has main().
– roottraveller
Jul 1 at 16:52



class


main()





and make sure just one is public as you can see here stackoverflow.com/questions/13132729/…
– nicksheen
Jul 1 at 17:00





3oh5iWLyg2dOkgqE gAiLs1Nb0H7Tjaf
3aLQ8i6wgFbdxSubiiPLK8CDDJQ0Uxaf9UsTEzQ8y

Popular posts from this blog

Rothschild family

Boo (programming language)