Inscrivez-vous ou connectez-vous pour rejoindre votre communauté professionnelle.
The answer is depending on what you want.
If you want more than one main method with the same signature, the answer will not NO and this is not for the main method only, it is the same for any other method.
If you want just the name of the method, the answer will be YES. Simply you can overload the main method as nothing special to it.
The only fact that you should put in mind is that when the compiler start to run your application, it will search for the method with the following signature (public static void main(String[])) in the specified startup class.
yes, u can have more then one main method in a class just maintion the main method public which u want to start the jvm execution.
we can have have multiple main methods, but in that one main method must be PSVMain(String args[]) and others different from this.
You cannot have morethan one main method in a class. The main method is like any other methods, You cannot have in java the same method (same signature: return type, method name, number/type of parameters) declared twice in a class
Yes,you can have more classes that contain the main() method, but at least one class which should contain main() and it should be public so that JVM will start that class as Main thread during compilation
no.more than one main method can't be used in class of same .
NO THERE MUST BE A SINGLE MAIN METHOD IN YOUR CLASS..MAIN() IS ENTRY POINT OF OUR PROGRAM.MAIN FUNCTION CAN BE EITHER VALUE RETURNING OR NON VALUE RETURNING.
Class can contain may functions, but you can have only one main function
yes but the main with array of string is considered as main thread so this cant be override and apart from that we can have any no. of main methods
No the program fails to compile. The compiler says that the main method is already defined in the class.
Avez-vous besoin d'aide pour créer un CV ayant les mots-clés recherchés par les employeurs?