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

Posted on    March-26-2014 1:59 AM

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

Sumit Kesarwani

Total Post:782

Points:3910
Posted on    March-26-2014 12:00 AM

When a method is declared as private, the program compiles properly but it will give runtime error Main method not public


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

Follow MindStick