Combining method overloading and overriding in the same class hierarchy can create ambiguity about which method actually gets invoked, because overload resolution happens at compile time based on the declared, or static, type, while overriding resolution happens at runtime based on the actual, or dynamic, type.
If a superclass has process(Object obj) and a subclass overrides it while also adding an overload process(String str), calling process() through a superclass-typed reference holding a String will still invoke the Object overload, resolved at compile time, surprising anyone expecting the more specific overload to run.
A concise interview answer is
Overloading is resolved at compile time using the declared type, while overriding is resolved at runtime using the actual object type. Mixing the two in a hierarchy can mean a call resolves to a different overload than intended when the static and dynamic types differ, which is why I avoid overloading methods that are also being overridden with similar signatures.
Last updated: 16 July 2026
Previous question: What is a deadlock in multithreading? How can you prevent it?
Next question: Why might it be bad practice to catch Throwable?