WHAT IF THE MAIN METHOD IS DECLARED AS PRIVATE

Mayank Tripathi

Total Post:807

Points:4035
Posted by  Mayank Tripathi
Java 
 494  View(s)
Ratings:
Rate this:
  1. Mayank Tripathi

    Post:807

    Points:4035
    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!