Solved

What does the word implementation mean with regards to generics?

Posted on 2011-09-10
5
359 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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
servlet doXXX methods 3 47
how to see all occupied ports on windows 10 laptop 15 59
maven module vs maven project 3 21
What's wrong with this code? 4 22
An old method to applying the Singleton pattern in your Java code is to check if a static instance, defined in the same class that needs to be instantiated once and only once, is null and then create a new instance; otherwise, the pre-existing insta…
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 third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…

816 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

8 Experts available now in Live!

Get 1:1 Help Now