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?

Answers


It appears you need

private Service var

var can be a reference to any sub-class of Service.


Need Your Help

Driving Direction Windows Store Apps with Bing Maps

c# windows-store-apps bing-maps

Currently, I am developing Windows Store Apps. I want to Ask, how to show driving direction in my application?

set focus on ListBox mvvm

wpf mvvm listbox focus

I have a ListBox populated with values, a Grid with a couple of TextBox and