Communiquez avec les autres et partagez vos connaissances professionnelles

Inscrivez-vous ou connectez-vous pour rejoindre votre communauté professionnelle.

Suivre

Can we override main method in java .?? how ??

user-image
Question ajoutée par Ajit Biswakarma , Product Specialist , Cognizant Technology Solutions India Pvt. Ltd.
Date de publication: 2014/05/29
Ajit Biswakarma
par Ajit Biswakarma , Product Specialist , Cognizant Technology Solutions India Pvt. Ltd.

correct answer. We can't override main() method because it is a static method.

Hamza Hasan
par Hamza Hasan , Backend Software Engineer , Shahid.net

No you cant, because it is a static method any kind of polymorphism, plus it's the main method where the first program excution, plus there is only one Main() method in the whole project.

No.You can't since its a static method. And polymorphism really doesn't apply to static methods. 

More Questions Like This

Avez-vous besoin d'aide pour créer un CV ayant les mots-clés recherchés par les employeurs?