Solved

What does the word implementation mean with regards to generics?

Posted on 2011-09-10
5
358 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
  • 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 40

Expert Comment

by:gurvinder372
ID: 36515478
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
groupSum5 challenge 5 71
firstswap challenge 20 68
Eclipse Neon and jdk 1.8.0 11 138
HSSFWorkbook cannot be resolved error 10 50
After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all.  Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …
For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.

867 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now