I'm relatively new to programming in general. And I've just recently started to learn about using generics in classes and methods. However, I'm confused about the differences between the different "standard" generic parameters. On the Oracle tutorial page for generics it shows these:
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
What are the differences in their uses (the one-word descriptions they give aren't super helpful)?
Does Java interpret the code differently depending on which one is used?
FREDfor example.Map<K, V>is slightly more legible due to the common naming than e.g.Map<A, B>, but you're free to use any names, even longer than single characters although that can become confusing.