1. for reflection class. getmethod (string name, class... parametertypes), if the element in parametertypes in the class is a numeric object type, an exception will be thrown when calling the basic type.
For example, test (long l); Class is used for calling. getmethod ("test", long. class) is unable to find the corresponding method, because the parameter is of the object type, the object type and the basic type need to be distinguished here, so the basic type can not be called during reflection
Long. Class! = Long. type; long. type = long. Class
2. Class. isassignablefrom (class <?> CLs) JDK documentation said
@ Return the booleanvalue indicating whether objects of the type CLS can be assigned to objects of this class but long. isassignablefrom (Long. class) the returned result is flase, because the jdk1.5 compiler automatically converts the basic type to the object type or converts the object type to the basic type during assign.