Saturday, 19 March 2016

Can an application have multiple classes having main method ?


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.

No comments:

Post a Comment

Note: only a member of this blog may post a comment.