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...

What happens when a main method is declared as private?

Answer Posted / pawan

vani, varsha is correct , the 'private main method' is as
good as any member method your class can have (note that
main is not a key word in java) , it can be only used inside
the class in which it is defined.

It is clearly mentioned in the specifications that the
executing class should contain a 'public static void method'
as a point of execution otherwise execution will fail
complaining ABOUT THE METHOD WHICH I MENTIONED ABOVE.

Is This Answer Correct ?    2 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is there any difference between synchronized methods and synchronized statements?

1049


What are the limitations of procedural programming approach?

998


Why generics are used in java?

962


Explain why wait(), notify() and notifyall() methods are in object class rather than in the reading class?

922


What is the purpose of the System class?

949


How many types of classes are there in java?

996


What is == and === in javascript?

991


What is use of inner class in java?

1036


What is the use of math abs in java?

959


What do you mean by object?

913


How to perform linear search in java?

897


What is singleton service?

907


What is the list interface in java programming?

1037


Is there is any difference between a scrollbar and a scrollpane?

938


What is the difference between method overriding and overloading?

1172