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

How many ways can you break a singleton class in java?

914


What is difference between static and final?

1010


Is linked list a linear or non-linear data structure?

912


explain multi-threading in java?

958


Explain reverse a linked list iterative solution in java?

879


What is jit compiler in java?

1026


how we can make a read-only class in java?

933


How listener identify that the event came from a particular object?

1949


What is hashset in java?

1053


What is * argv?

1159


Can you create an object of an abstract class?

945


What is the loop in java?

1044


Hi.... I applied for the post of scientific officer/Engineer-SB(Programmer).Please post the syllabus and sample papers.

1947


What is null mean in java?

1028


Compare java and python.

934