Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

Can we override the main method?

Answer Posted / nikhil agrawal

Main method is static and static method is not override.
For example:- if i have Class A having main method and Class B extends Class A and also having the main method. in that case Class B hide the main method of A not override.
overriding process occur on run time and but static method load on compile time. that's its the reason we can not override main method but we can hide it.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What kind of variables a class can consist of?

1042


State the significance of public, private, protected class?

1031


How are multiple inheritances done in Java?

1093


Write a method that will remove given character from the string?

964


List two java ide’s?

991


Can we write a class without main method in java?

897


When do I need to use reflection feature in java?

1011


Is string an object?

1064


What is the best definition for data?

925


Difference between final and effectively final ?

1026


What are nested classes in java?

1040


What are inner classes or non static nested classes in java?

1121


Explain implementation and how is it different from conversion?

1021


What is the difference between serializable and externalizable interfaces?

1027


Difference between a process and a program?

1059