I have a class that extends comparable and implements a generic interface and I want to create an instance of that class .
for example
interface MinMax<T extends Comparable<T>> {...}
class Employee<T extends Comparable<T>> implements MinMax<T> {...}
in this example i want to create an instance of Employee , how is that possible ?
new Employee<String>()ornew Employer<Integer>, for example. You simply need to provide a type variable within the bounds. (Depending on the context,new Employee<>()might work too).