extending a generic class
hi all,
i want to extends a generic class, HashTable<K,V> to be concrete , but i want my class would be in use as MyHashTable<String, String>
does any one know the syntax for that ?
what i actually mean is how do i set the generics data types in the inheritance mechanism ?
thanks
Jaimon
> hi all,
>
> i want to extends a generic class, HashTable<K,V> to
> be concrete , but i want my class would be in use as
> MyHashTable<String, String>
> does any one know the syntax for that ?
> what i actually mean is how do i set the generics
> data types in the inheritance mechanism ?
So, you want your MyHashTable to not be generic, but always be a Hashtable<String, String>? The syntax is the same as everywhere.
class MyHashtable extends Hashtable<String, String> {
}
Or do you want your MyHashtable to be generic, as in:
class MyHashtable<K, V> extends Hashtable<K, V> {
}
Lokoa at 2007-7-14 21:09:04 >
