If I had a Java generic class of...
public class EntityStuff<C> extends AbstractPropertyStuff<C> implements Serializable { }
Is this the same as...
public class EntityStuff<T> extends AbstractPropertyStuff<T> implements Serializable { }
does the letter hold any significance?
No, there is no significance.
There are conventions (see Java Generics Tutorial):
E - Element (used extensively by the Java Collections Framework) K - Key N - Number T - Type V - Value S, U, V etc. - 2nd, 3rd, 4th types
It's exactly the same, letter doesn't hold any significance. In fact, the type parameter can be any valid Java identifier, so:
EntityStuff<T> EntityStuff<t> EntityStuff<TTT> EntityStuff<ttt> EntityStuff<_t23>
are all legal.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With