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 is the use of inner class?

1096


How do you create a sop?

1041


What is difference between iterator and enumeration in java?

1032


Why do we override tostring method in java?

1023


Can java run on google chrome?

1247


Can you make a constructor final?

1073


What is string variable?

1105


What is the private method modifier?

1136


Which method cannot be overridden in java?

1039


Can list have duplicates in java?

954


What is the use of a copy constructor?

1033


Does treeset use compareto?

1020


Explain when classnotfoundexception will be raised ?

1082


Why is stringbuffer not immutable?

1129


How we can declare a static variable?

1146