I would like to create a method which returns type is a map object and parameter should be a class which extends A and implements I. So my code is as follows:
public Map<String,String> getIdea(Class < ? extends A & I) { .....}
But i am getting a compilation error saying that my syntax is wrong. It is expecting a comma right after A. It does not work even with comma. Do you have any idea?
To put what Sotirios Delimanolis said in comments into code:
To be honest, I don't think that the wildcard gets you anything here since
Tis tightly bound, so you may be better off with the non-wildcard version.