Java: In Java, which comparison about Polymorphism, Overloading, and Overriding is accurate?

Difficulty:

Easy

Questions:

1

Time Limit:

2 minutes

Passing Score:

100%

Question

In Java, which comparison about Polymorphism, Overloading, and Overriding is accurate?

  1. There is no practical difference in behavior, performance, or API design when Polymorphism, Overloading, and Overriding is involved.
  2. The oldest option related to Polymorphism, Overloading, and Overriding is always the right production choice regardless of context.
  3. Differences around Polymorphism, Overloading, and Overriding are mostly cosmetic, so correctness and maintainability do not change.
  4. A subclass override changes inherited behavior, but an overload is simply another method signature chosen by the compiler.

Hint

Focus on the behavior or tradeoff, not just the keyword.

Answer and rationale

Correct answer: D. A subclass override changes inherited behavior, but an overload is simply another method signature chosen by the compiler.

A subclass override changes inherited behavior, but an overload is simply another method signature chosen by the compiler. This is the comparison that usually separates memorization from understanding.

Track: Java