Explain the concept of polymorphism with examples?

Answer Posted / dhawal

polymorphisum-polymorphisum means one name many
forms,basically polymorphisum is base class pointer which
can access derive class members

real time example:-
on street signal if red signal turn on all type of vehicals
are stops means on single action multiple tasks are done.


compile time polymorphisum-overloading.

run time polymorphisum-overriding.

Is This Answer Correct ?    16 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the purpose class.forname method?

546


Is singleton class thread safe?

524


Explain the difference between extends thread vs implements runnable in java?

523


How can we make a class virtual?

629


What do you mean by multithreaded program?

544






How many types of classes are there in java?

511


Difference between string, stringbuffer and stringbuilder?

560


Can an interface implement another interface?

562


What is thread life cycle in java?

572


What are recursive functions?

567


What is the static field modifier?

587


What does a boolean method return?

621


What is args length in java?

648


What is %d in printf?

513


What are different data structures in java?

523