Start networking and exchanging professional insights

Register now or log in to join your professional community.

Follow

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

user-image
Question added by Ajit Biswakarma , Product Specialist , Cognizant Technology Solutions India Pvt. Ltd.
Date Posted: 2014/05/29
Ajit Biswakarma
by 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
by 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.

Deleted user
by Deleted user

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

More Questions Like This

Do you need help in adding the right keywords to your CV? Let our CV writing experts help you.