What is RunTime Polymorphism?

Answer Posted / ansar hussain.m

Polymorphism means one object behaving as multiple forms.
simple one in many forms .
there are two types of poly morphism
1) compile time
2) runtime

1)compile time:
overloading a method , constructor , operator etc.. comes under compile time polymorphism because compiler checks the type and number of parameters passed on to the method and decides which method to call at the compile time itself and it will give an error if there are no method that matches the method signature of the method that is called at the compile time itself


2) runtime polymorphism:

overriding comes under runtime polymorphism because the compiler would not be aware of the method is available for overriding the functionality or not. so compiler would not give any error at compile time. At runtime it will be decided which method to call. and if there is no method at runtime it will give an error

Is This Answer Correct ?    26 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the lapsed listener problem?

821


Describe the Managed Execution Process?

2113


Dynamic Fonts

1553


Write the .net syntax for 'while loop'?

662


What are the new features in .net core?

637






What is garbage collection? Explain the difference between garbage collections in .net 4.0 and earlier versions?

775


Do you know what are three common acronyms used in .net, and what do they stand for?

645


How do you generate a strong name?

693


Example from .net. Integer & struct are value types or reference types in .net?

640


When should I use .net core?

665


Explain me what is a design pattern and what is it for?

654


What is close method? How its different from finalize and dispose?

619


What are pdbs?

676


Explain what inheritance is, and why it's important?

584


How does u handle this COM components developed in other programming languages in .NET?

1767