[Oracle interview]Can an application have multiple classes having main method?
Yes it ispossible. 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 havementioned. Hence there is not conflict amongst the multiple classes havingmain method.
页:
[1]