English

Overloading of methods even depends on return type. - Computer Applications

Advertisements
Advertisements

Question

Overloading of methods even depends on return type.

Options

  • True

  • False

MCQ
True or False

Solution

This statement is False.

Explanation:

  1. In Java, method overloading is independent of return type.
  2. Overloaded methods are those that have the following:
    1. It has the same name, but
    2. Different parameter lists (quantity, kind, and order of parameters).
  3. The return type alone cannot distinguish between overloaded methods since the compiler utilizes the method signature (name + parameter list) to determine which method to invoke.
shaalaa.com
  Is there an error in this question or solution?
Chapter 5: User - Defined Methods - EXERCISES [Page 335]

APPEARS IN

Avichal Computer Applications [English] Class 10 ICSE
Chapter 5 User - Defined Methods
EXERCISES | Q III. 3. | Page 335
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×