Java Language Fundamentals Multiple choice question

Exercise : - Multiple Choice Question On Java, MCQ Java Language fundamentals

This section contains a lot of java question and answer with explanation on the topic language fundamentals. These question and answer are very much helpful for interview(campus interviews, walkin interviews, company interviews), competitive examination ,entrance test and placements. Each question having answer and explanation that would help you to understand easily. These question are designed from basic to advance level. So anyone can learn from here (beginner, fresher, engineering graduate, an experienced IT professional).

All the question of java are listed below on language fundamentals along with detailed explanation / solution and answer.

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).