Java – the opposite of “isassignablefrom” for class objects?

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
分享
二维码
< <上一篇
下一篇>>