What is the difference between ‘E’, ‘T’, and ‘?’ for Java generics?

I come across Java code like this:

public interface Foo<E> {}

public interface Bar<T> {}

public interface Zar<?> {}

What is the difference among all three of the above and what do they call this type of class or interface declarations in Java?

6 Answers
6

Leave a Comment