Languagemedium0-2 years
How are overloading and overriding resolved differently?
Overloading is resolved at compile time from the static types of the arguments. Overriding is resolved at run time from the receiver's class. Only the receiver is dispatched dynamically; the arguments never are.
PreviousWhat changed in switch, and why should a sealed switch have no default?Next Explain the access modifiers, and why package-private is a design tool.
Is Java pass-by-value or pass-by-reference?What happens if you override equals() but not hashCode()?Why are strings immutable in Java, and what does that cost?What is the difference between int and Integer? Where does autoboxing bite?What changed in switch, and why should a sealed switch have no default?