Home > Back-end >  Public static <T> T getbean (Class <T> CLZ)
Public static <T> T getbean (Class <T> CLZ)

Time:09-30

Why do I get rid of the method parameter of generics, public static & lt; T> T getbean (Class CLZ), why is the return value is the object type, parameters and why don't have to write a generic

CodePudding user response:

Returns the generics, incoming should also be generics, you even if the parameter is not generic, but you return to have a problem for certain,

CodePudding user response:

reference 1/f, 007 small bag response:
returns the generics, incoming should also be generics, you even if the parameter is not generic, but you return to have a problem for certain,

I'm calling again elsewhere this method, and then I will return to the strong object type to type, I need on my video object type is the return value of the study

CodePudding user response:

The generic erasure

CodePudding user response:

This will receive parameters according to you to return to save (E) the object of this thing

CodePudding user response:

reference antell whoops, 4/f, reply:
this will receive parameters according to you to return to save (E) the object of this thing

This I know, I just don't know why return type of the object

CodePudding user response:

reference 1/f, 007 small bag response:
returns the generics, incoming should also be generics, you even if the parameter is not generic, but you return to have a problem for certain,

When I return to the return value is strong to the generic type

CodePudding user response:

reference 1/f, 007 small bag response:
returns the generics, incoming should also be generics, you even if the parameter is not generic, but you return to have a problem for certain,

, can you explain in detail, the younger brother for a long time,
  • Related