I want to write a method that gets 2 parameters:
- an interface.
- a class that implements that interface.
I want it to be generic (compile time type safe).
is there a way?
if not, whats the alternative?
is there an option to get generic param that is an interface? ho do I declare it?
?
some thing like this ??
In the above method first parameter would be an interface, and second parameter would be any class that implements that interface.
In generics, interface implementation and class extending is represented using extends keyword. there is no implements keyword in the world of generics.