Styrow.dev
Question 9 of 247
Java Topic: General medium

Can we put more than one main class in a single java file?

Question

Can we put more than one main class in a single java file?

Answer

Yes, we can. If for example, there are three main classes in a program, three class files will be created.


šŸ“² Practice Offline on Mobile: Download the free QA Automation & SDET Prep app on Google Play & App Store.