1. Does it Cost Generic ??
Previously we have discussed the collection. For example, using the object list. If we look at the program list can be included various types of data. This is going to be bad when we make the process of data manipulation because certainty the type of data that goes into theTo deal with the type of the collection, we can make use of the generic. when the object declaration, we do not need to specify what type of data. for readers who have a basic C ++, then this generic can be implemented by using a template that you know.
How generic realization in java ??
Java incorporate these generic features since 2004 and part of j2SN 5.0. through these features, can be declared without a specified variable data type. in java we can declare generic with the following symbols:<E> to elements of a collection
<T> for Type
<K, V> for Key and Value
<N> for members
S, U, V gigunakan for parameters to 2,3,4

No comments:
Post a Comment