Home > DeveloperSection > Interviews > What if the main() method is declared as private?

Posted on    August-23-2014 6:07 AM

 Java Java 
Ratings:
 1 Answer(s)
  717  View(s)
Rate this:

Sumit Kesarwani

Total Post:782

Points:3910
Posted on    August-23-2014 12:00 AM

The program compiles properly but at runtime it will give "main() method not public." message.


Don't want to miss updates? Please click the below button!

Follow MindStick