Java Foundations — Question 37

Which method identifier is correct according to Java naming conventions?

Answer options

Correct answer: D

Explanation

The correct answer is D, as method names in Java should start with a lowercase letter and use camel case for subsequent words. Options A and D are not suitable as they represent class names, while option C does not follow camel case conventions.