Solved

What does the word implementation mean with regards to generics?

Posted on 2011-09-10
5
362 Views
Last Modified: 2012-06-21
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?
0
Comment
Question by:shampouya
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 40

Expert Comment

by:gurvinder372
ID: 36515469
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
 
LVL 47

Expert Comment

by:for_yan
ID: 36515472
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
 
LVL 47

Accepted Solution

by:
for_yan earned 500 total points
ID: 36515480
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
 

Author Closing Comment

by:shampouya
ID: 36518320
thanks
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
This video teaches viewers about errors in exception handling.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question