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

Posted on    August-23-2014 6:07 AM

 Java Java 
 1 Answer(s)
  704  View(s)
Rate this:

Sumit Kesarwani

Total Post:782

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