Which of the following statement(s) is/are correct regarding java programming?
Which of the following statement(s) is/are correct regarding java programming?
I. Place a semicolon immediately after a method header.
II. Define a method outside the braces of a class definition.
Show answerHide answer
Correct answer: (D) Neither I nor II
Explanation
Both are common errors: a semicolon after a method header ends the declaration, and in Java every method must be defined inside the class body braces. Neither statement is correct.