Java – the opposite of “isassignablefrom” for class objects?
•
Java
Given a class object, how to check whether one of the "ancestors" belongs to a class?
Solution
Given a Class C1, do you want to know whether one of its ancestors is C2?
Accustomed to
c2.isAssignableFrom(c1)
Know how?
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码