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

extending thread class or implementing runnable interface. Which is better? : Java thread

997


How will you load a specific locale?

972


How are destructors defined in java?

1032


What is Garbage Collection in Java

1079


How many ways can we create the string object?

1015


Can a list be null in java?

1045


What are the ways in which a thread can enter the waiting state?

939


How much ram can a 64 bit processor theoretically?

883


What is "this" keyword in java? Explain

1098


What is the meaning of variables in research?

1032


What is main string [] args?

989


What is the difference between an if statement and a switch statement?

1161


java program with complete 4 oops concepts implemented example

3155


What are 3 boolean operators?

1001


Explain the difference between runnable and callable interface in java?

1045