Which of these access specifiers must be used for main() method?
A. private
B. public
C. protected
D. None of the mentioned
Answer:A
Which of these access specifiers must be used for main() method?
A. private B. public C. protected D. None of the mentioned
Explanation: main() method must be specified public as it called by Java run time system, outside of the program. If no access specifier is used then by default member is public within its own package & cannot be accessed by Java run time system.