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?
shampouyaAsked:
Who is Participating?
 
for_yanConnect With a Mentor Commented:
So they use here the word implementation in its very general lexic sense - to implement some idea, to implement some algrorithm - not neccessarily
in the strict java term as a class implementing interface
0
 
Gurvinder Pal SinghCommented:
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.

0
 
for_yanCommented:
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
0
 
shampouyaAuthor Commented:
thanks
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.