Java OCA OCP Practice Question 1213

Question

Which of the following statements about overloaded methods are true?

I.  Overloaded methods must have the same name. 
II. Overloaded methods must have the same return type. 
III.Overloaded methods must have a different list of parameters. 
  • A. I
  • B. I and II
  • C. I and III
  • D. I, II, and III


C.

Note

Overloaded methods have the same name but a different list of parameters, making the first and third statements true.

The second statement is false, since overloaded methods can have the same or different return types.

Option C is the correct answer.




PreviousNext

Related