General syntax to continue or equal

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.

+2
source share
2 answers

You already have:

GenericExample<ItemType extends MyObject>

The first generic guide can be found here: http://download.oracle.com/javase/1.5.0/docs/guide/language/generics.html

+3
source
GenericExample<T extends Object>
+1
source

All Articles