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.

Why use id when we can just use NSObject?

I know that when we want to create an unknown value object we use id. However, I'm curious that why …

objective-c cocoa class types polymorphism
unique_ptr upcast in return

I have this function that's supposed to generate different derived objs and return as a unique_ptr<base>: …

c++11 polymorphism unique-ptr upcasting
Why does this polymorphic C# code print what it does?

I was recently given the following piece of code as a sort-of puzzle to help understand Polymorphism and Inheritance in …

c# .net oop inheritance polymorphism
Calling child method, when cast to parent type in java

I am having problems with some course work i'm trying to finish off and any help would be appreciated! I …

java polymorphism class-hierarchy