Defining a variable through a subclass
I'm using Java and I'd like an attribute of a class to be of any class derived from the class Service. I tried to write this:
private ? extends Service var
but it didn't work. What should I write?
It appears you need
private Service var
var can be a reference to any sub-class of Service.