Link to home
Start Free TrialLog in
Avatar of shampouya
shampouya

asked on

What does the word implementation mean with regards to generics?

My textbook says "An important mechanism that supports code reuse in object-oriented programming is the generic mechanism. If the implementation is identical except for the basic type of the object, a generic implementation can be used to describe the basic functionality."

What does implementation mean in this context?
Avatar of Gurvinder Pal Singh
Gurvinder Pal Singh
Flag of India image

In simple words, its like the base class to the derived classes. Common functionality is moved to the base class, and only extra (remaining) one can be placed in the derived class.

they mean that two methods which essentially are implemented in the same way with the only difference
that different type is used - then it is the case where generics would allow you to reuse the same code,
evben though without the generics you'd have to write a separatr version of the code for each type
ASKER CERTIFIED SOLUTION
Avatar of for_yan
for_yan
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of shampouya
shampouya

ASKER

thanks