Custom Search
What if the main method is declared as private ?
The program compiles properly but at runtime it will give "Main method not public." message.
The prevalent collection of Java Interview FAQ’s with answers, explanations, code and much more.