Polymorphism | Sololearn: Learn to code for FREE!
¡Nuevo curso! ¡Todo programador debería aprender IA Generativa!
Prueba una lección gratuita


So... what is the difference between "Virtual", "Abstract" and "Interface"? Although they seem different in definition, but they all carry the same purpose(As I understood). So why defining three, when one of them does the same work as the other? ūü§Ē

23rd Mar 2017, 4:30 PM
Amir Hossein Karimi
Amir Hossein Karimi - avatar
2 Respuestas
+ 1
In interface u put abstract keywords without specifiing them to be abstrac 'cuz they are automatically set ....and the difference betwen virtual and abstract is that in abstract u do not have to pre-define keyword ...both of them work almost the same way... if i remmember correctly
26th Mar 2017, 4:14 PM
Michal Tomko (Yoaseth)
Michal Tomko (Yoaseth) - avatar
yea they are same,... thank you
26th Mar 2017, 4:17 PM
Amir Hossein Karimi
Amir Hossein Karimi - avatar