OA. free
Free
Qualcomm Embedded Systems & Hardware Core Computer Science Medium

QUESTION 59 Which of the below given statement(s) is/are true?

Qualcomm technical mcq question, verified with a worked answer. Free to practise - no sign-up.

QUESTION 59

Which of the below given statement(s) is/are true?

I) While doing method overloading argument list should be same where as in method overriding argument list should be different

II) A class can have more than one private or final methods of same name but a child class cannot override the private or final methods of their base class

Choose one option.
Show answer & explanation
Answer: B. Only (II)

Statement I is false: method overloading requires different argument lists (different number, type, or order of parameters), not the same list. Statement II is true: a class can have multiple methods with the same name (if they're private or final), and child classes cannot override private or final methods from the base class because private methods are not inherited, and final methods explicitly forbid overriding.

Step-by-step Derivation:
Analyze each statement:

Statement I: FALSE

  • Method Overloading: Requires different argument lists (different parameters by count, type, or order).
    Example: void method(int x) and void method(int x, int y) are valid overloads.
  • Method Overriding: Requires the SAME argument list and return type (covariant return types allowed).
    Example: Parent class void display(int x) → Child class void display(int x)
  • Statement I reverses these rules, so it is FALSE.

Statement II: TRUE

  • A class CAN have multiple methods with the same name if they differ in parameters (overloading).
  • Private methods cannot be accessed by child classes, so they cannot be overridden; a child class method with the same name is a new method, not an override.
  • Final methods explicitly prevent overriding in child classes (compile-time error if attempted).
  • Statement II is TRUE.

Conclusion: Only Statement II is true → Answer is B.