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

Posted on    March-26-2014 1:59 AM

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

Sumit Kesarwani

Total Post:782

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