I defined the following interface and class
public interface Storeable {
public static String getId() {
return "id";
}
}
public class ABC implements Storeable{
public static String getId() {
return "id2";
}
}
Further, I defined the following method where I get an error-message "The method getId() is undefined for the type T":
public static <T extends Storeable> T getItem(String id) {
Class<T> classOfT;
T.getId();
....
}
Why is this not working? Eclipse Quick-Fix simply creates a further static method in the interface