Which of the following are valid main()
methods?
A. public static void main() { } B. public static void main(String[] argc) { } C. void main(String[] args) { } D. public static void main(String []args) { }
B and D.
The main()
method of answer A is missing an argument.
The main()
method of answer C is missing the public and static modifiers.