G'day!
Given two classes: A and B, and given G: a generic class, in Java.
If I were to define the generic class as G<A>
or G<B>
, would it be make any difference that A and B are defined as classes themselves? My gut feel is no, because the letter is just the parameter to be used within the class attributes/methods, and will be replaced by whatever class G is parameterised by, upon initialisation. But this does seem to complicate things, because what if you wanted to have an attribute of type A or B within G?