How is the Java syntax for GenericExample <ItemType (extends or equal to) Object>?
Thank you Adam.
Update:
Thanks for all your answers. The answers here are more related to using generics in code, I would like to discuss the implementation of slowdown, for example:
class GenericExample<ItemType (extends or equal to) ParentType> {
}
class Inherited<ParentType> extends GenericExample<ParentType> {
/* The type parameter in this class does not compile.
I would like to find a work around to make something like this to work.
I would like to have ParentType=JComponent , and thus to specify that the
Inherited class uses JComponent for needed flexibility*/
}
Hope this makes sense ...
Adam.
source
share