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 / chinmay

If main method declared as private then at compilation no problem but at run time it shows an error that main method should be public...
because we access the main() method out side from class if it is private then it cannot be accessible...
that's why we have to write public in main method signature...

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is difference between path and classpath?

1165


Can memory leak in java?

1033


Difference between notify() method and notifyall() method in java?

968


What is an off by one error in java?

955


How does compareto method work?

962


What does it mean that a method or field is “static”?

975


Why volatile is used in java?

1055


What is string in java with example?

1020


What is the properties class in java programming?

1004


What is the method in java?

1097


Difference between static synchronization vs. Instance synchronization?

1118


How many types of memory areas are allocated by jvm?

1042


What is string builder in java?

1011


What are some examples of variable costs?

955


How to sort elements in a parallel array in java?

886