ODNYX.
Tutorials
Java
CSS
Database
DevOps
Spring
Design Patterns
References
Subscribe
Java
CSS
Database
DevOps
Spring
Design Patterns
Compile-time Polymorphism — Quick Check
1. Method overloading is an example of which kind of polymorphism?
Runtime polymorphism
Compile-time polymorphism
Neither, it's unrelated to polymorphism
Both, depending on the JVM version
2. Can you overload a method by changing only its return type?
Yes, that's a valid overload
No, the parameter list must differ
Only if the method is static
Only for constructors
Check answers
❮ Home
Next: Runtime Polymorphism ❯