1.

Main Method From Another Class?

Answer»

Yes, the main method can be CALLED from a separate class. First you MUST prepare the STRING array of arguments to PASS to the method, then call the method through a static reference to the HOST class, MaxFactors in the example below.
String[] arguments = new String[] {"123"};
MaxFactors.main(arguments);

Yes, the main method can be called from a separate class. First you must prepare the string array of arguments to pass to the method, then call the method through a static reference to the host class, MaxFactors in the example below.
String[] arguments = new String[] {"123"};
MaxFactors.main(arguments);



Discussion

No Comment Found