Can application have multiple classes having main method

Can application have multiple classes having main method

Answer: Of course yes . While starting the application you give class name that needs to be run. The JVM will look for the Main method only in the class whose name you have given and hence there won’t be any conflict among the multiple classes having main method.

Leave a Reply

Your email address will not be published. Required fields are marked *