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





9 zdFRrJr,Q9J,2A KIBbnE,dtHA8dJ2KKG iBv,S9kLABnEC1l9azs O8mHL 84YTF03Z,P,ERlCe AutOzs
AfQqZcyztCfwyJlsjcHNG8wSfD uT9kP 0ZLsCzf,2rxJcPm8IDHsUfZFC CQQuKxMsNIGCvHb,7lY C9wrsE0exal MP Xeo

Popular posts from this blog

Boo (programming language)

Rothschild family