He thinks you're trying to create a type parameter - a variable - whose name is String . I suspect your first subclass just does not import java.util.HashMap .
In any case, if T is a parameter of the type of your interface, which probably should be, then you should not include <String> in subclasses at all. It should be easy
public interface Interface<T> { public Result query(T query); } public class Subclass implements Interface<String> { ... public Result query(String queryStr) { ... } }
Louis Wasserman
source share