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

define polymorphism in java

1097


What is java abstraction with example?

1070


What is the difference between break and continue statements?

1040


Java Compiler is stored in JDK, JRE or JVM?

1522


Mention some features of java?

964


Explain the difference between collection api and stream api in java8?

980


How large is a boolean?

1016


What is int lol?

1142


Is string a data type in java?

1028


How does queue work in java?

990


what is difference betweem home interface and remote interface?

2634


When should you use arraylist and when should you use linkedlist?

932


Explain the concept of proper inheritance?

1068


What happens if we override only equals?

975


What about features of local inner class?

1070