+ 4
Polymorphism
What is polymorphism?
4 Respostas
+ 7
From the Learn section
https://www.sololearn.com/learn/CPlusPlus/1910/?ref=app
+ 2
It's when you refer to an object of subclass using a superClass refrenece variable
It basically means a superClass refrenece variable can hold a subClass refrenece and can call the basics of what each subClass extends, the correct methods are decided on what the object is rather then the refrenece type.
Takes a while to sink in but becomes clear when coding as long as you know what/how a variable type works and the diffrenece between a refrenece variable and a object refrenece and casting a object refrenece to a super type.
0
Hi
0
My name is Amir Ali