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 the point of polymorphism java?

1069


When we should use serialization?

1092


How do you check if two given string are anagrams?

1004


What is the difference between == and === javascript?

1250


How to instantiate static nested classes in java?

1135


What is difference between variable declaration and definition?

1013


What is the difference between jfc & wfc?

1122


What is volatile data type?

1070


Is java written in c?

1020


What is null data type?

1186


What is meant by 'Class access modifiers'?

1093


Explain about interthread communication and how it takes place in java?

1077


What is the abstract class?

1090


What is ‘has a’’ relationship in java?

1278


a thread is runnable, how does that work? : Java thread

1093