java - Generic Lower bounded Method -
Assume that I have the following classes My question is, how do I create a lower bound method in . TL; DR: Type parameters can have several bounds, such as a class box {...}. But there can be no lower bound in a type parameter, that is, a composition such as the class box {...} is not allowed. why not? The answer is: It is useless because it does not buy you anything, it is allowed. animals , fish And catfish . Catfish extended fish and fish extension animals . MyPets is a general category called , in which there is a type parameter (normal) called T , and with paragraphs Will be done. Objects. D which is the catfish class.
Comments
Post a Comment