Java Language Fundamentals Multiple choice question

Exercise :: language fundamentals - General Questions

This section contains a lot of Question with answer and explanation.

1) What is correct syntax for main method of a java class?
A. public static int main(String[] args)
B. public int main(String[] args)
C. public static void main(String[] args)
D. None of the above

Answer:

public static void main(String[] args)

Option:

( C )


Explanation :

The correct syntax of main method is- public static void main(String[] args).