Hi guys... I need ans for this problem badly--- difference between generics and polymorphism using code examples. I know its related somthing to compile time or binding but i am not sure..please help
A:
Polymorphism:
http://en.wikipedia.org/wiki/Polymorphism_in_object-oriented_programming
Generics:
http://en.wikipedia.org/wiki/Generic_programming
Good luck with understanding the differences ;)!
Younes
2010-03-11 07:46:53
A:
Polymorphism is a property of classes, in that they implement a common interface, or are derived from a base class, implementing virtual methods in a different way to reflect the different behavior of derived classes.
Generics is a property of an algorithm, or a class implementing an algorithm (sort) or a common operation (lists), requiring the classes they deal with to have certain methods, properties, or interfaces.
devio
2010-03-11 07:53:52
is there any code example that will make it clear?
Kelly
2010-03-11 07:54:53
thnx for your help devio..appreciate it
Kelly
2010-03-11 08:01:07