Let's say I have an interface A
with generic type:
public interface A<T> {
T getT();
}
and a class B
implementing it:
public class B implements A {
public Integer getT() { return 1; }
}
...but without give it a type parameter.
What happens here? Does the A
be infer to A<Integer>
? Is it possible to force user to write type parameter with implements
statement(like B implements A<Integer>
)?