Tuesday, October 1, 2013

Java:The meaning of T extends Comparable<T>

 

Review this:

http://stackoverflow.com/questions/8537500/java-the-meaning-of-t-extends-comparablet

 

This means that the type parameter must support comparison with other instances of its own type, via the Comparable interface.

An example of such a class is provided in the Oracle tutorial Object Ordering.

No comments:

Post a Comment