I’m looking for the correct syntax for the following:
public class Foobar<K extends SomeJavaAPIClass and implements Cloneable>{
So that I can have Foobars of ‘K’, where K is a generic subclass of SomeJavaAPIClass and where K has it’s own clone() method
I’ve tried <K extends SomeJavaAPIClass, implements Cloneable> with no luck, along with other permutations
Use
&:Note that in generic wildcards, “extends” just means “is a subtype of”, so you use it for either classes or interfaces.