Can an application have multiple classes having main() method? Ans. Yes it is possible. While starting the application we mention the class name to be run. The JVM will look for the Main method only in the class whose name you have mentioned. Hence there is not conflict amongst the multiple classes having main() method. - Study24x7
Social learning Network
18 Nov 2023 11:21 AM study24x7 study24x7

Can an application have multiple classes having main() method? Ans. Yes it is possible. While starting the application we mention the class name to be run. The JVM will look for the Main method only in the class whose name you have mentioned. Hence there is not conflict amongst...

See more

study24x7
Write a comment
Related Questions
500+   more Questions to answer
Most Related Articles