E and T are used as Java generics type variables, but I was wondering what the difference between these alphabets was.
In conclusion, the type variable name is also a variable name, so unless you use reserved words, the syntactic meaning does not change.
However, it is good that the variable name is easy for humans to understand and the meaning can be guessed, so it is written according to what type the type actually assigned represents.
For example, E is element and the type variable of the element of the array, T is type and there is no strict specification.
When deciding on a normal variable, do it in the same way as making it easier to guess the meaning later. Nari that decides the type variable so that you can see what type it represents when you look back at it later
Recommended Posts