in java i am using generics and in class i want to use implements interface(? extends class) and this interface is generic interface<T> but i get message as
same interface as superclass
code example:
public interface ISomething<T>
{
string Name { get; set; }
string GetType(T t);
}
public class SomeClass implements ISomething<T extends SomeClass2>
is this possible?
You cannot use a generic specifier that is not defined. In your example for
SomeClass,Tis not declared.This is invalid:
Either of these are valid
or