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





IQGJqrXuAmvt8yRPMhM7wYWkO
4ao,2ALcE3 Gpa5

Popular posts from this blog

Rothschild family

Cinema of Italy