+ 4

Polymorphism

What is polymorphism?

1st Feb 2021, 3:53 AM
Kalindu Wanasinghe
Kalindu Wanasinghe - avatar
4 ответов
1st Feb 2021, 4:10 AM
Ipang
+ 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.
1st Feb 2021, 10:21 AM
D_Stark
D_Stark - avatar
0
Hi
2nd Feb 2021, 6:25 AM
YASHAR GHASEMI
YASHAR GHASEMI - avatar
0
My name is Amir Ali
2nd Feb 2021, 6:33 AM
YASHAR GHASEMI
YASHAR GHASEMI - avatar