Comparing generic types Java
I suspect you want something like:
class Element<T extends Comparable<T>>
... using the Comparable
interface and a bounded type parameter.
I suspect you want something like:
class Element<T extends Comparable<T>>
... using the Comparable
interface and a bounded type parameter.