WHAT IF THE MAIN METHOD IS DECLARED AS PRIVATE?

Chris Anderson

Total Post:197

Points:985
Posted by  Chris Anderson
Java 
 2388  View(s)
Ratings:
Rate this:
  1. Chris Anderson

    Post:197

    Points:985
    What if the main method is declared as private?

    The program compiles properly but at runtime it will give “Main method not public.” message.

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!