The program compiles properly but at runtime it will give “Main method not public.” message.
Can you answer this question?
Write Answer1 Answers