Advertisement

Can there be 2 main methods in Java?

Can there be 2 main methods in Java? Find more answers: 👀
Can there be 2 main methods in Java?
Can a Java program contain more than one 'main' method in a class ...
Jul 16, 2018

'main' means public static void main(String[] args) which is entry point in java programs . You can have more classes that contain the main() in a program . And you can choose to execute one class or another class. But you can't have more than one main method (String[] args as arguments) within same class.

Can there be 2 main methods in Java?,answer,faq,frequently asked question,

Post a Comment

0 Comments