Dynamic Polymorphism

Write a program for dynamic polymorphism without using method overriding?

Showing Answers 1 - 3 of 3 Answers

Fathima

  • Dec 16th, 2011
 

I believe we can acheive dynamic polymorphism using interface

Example:

Code
  1. public interface A{

  2. //Something

  3. }

  4.  

  5. public Class B implements A{

  6. //some methods

  7. }

  8.  

  9. A a = new B();

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions