Top "Polymorphism" questions

In computer science, polymorphism is a programming language feature that allows values of different data types to be handled in a uniform manner.

Retrieving Polymorphic Hibernate Objects Using a Criteria Query

In my model I have an abstract "User" class, and multiple subclasses such as Applicant, HiringManager, and Interviewer. They are …

hibernate jpa polymorphism criteria detachedcriteria
static block vs initializer block vs constructor in inheritance

i find this example and i want to understand the logic behind it ? how constructors and static blocks and initializer …

java inheritance constructor polymorphism static-block
Do polymorphism or conditionals promote better design?

I recently stumbled across this entry in the google testing blog about guidelines for writing more testable code. I was …

c++ oop tdd polymorphism
What is the purpose of Rank2Types?

I am not really proficient in Haskell, so this might be a very easy question. What language limitation do Rank2…

haskell types polymorphism higher-rank-types
How do I make a class generic for all Numeric Types?

I am trying to create a Vector class that is generic for all numeric types. my original attempt was to …

scala polymorphism type-parameter
Why can't you reduce the visibility of a method in a Java subclass?

Why does the compiler give an error message when you reduce the visibility of a method while overriding it in …

java polymorphism overriding subclassing
What is the difference between polymorphism and duck typing?

I'm a little confused with the two terms, here's what I know: Polymorphism is the ability of object of different …

oop polymorphism duck-typing
Jackson Polymorphic Deserialization based on Enum

I'm working with JacksonPolymorphicDeserialization, this is my code which deserializes into the proper class based in the 'type' property: @JsonTypeInfo( …

java json polymorphism jackson
Practical advantage of generics vs interfaces

What would be a practical advantage of using generics vs interfaces in this case: void MyMethod(IFoo f) { } void MyMethod&…

c# generics polymorphism
Polymorphism vs Strategy pattern

What is the difference between the Strategy pattern and Polymorphism in Java? I'm confused that whatever is achieved via Strategy …

java design-patterns polymorphism strategy-pattern