For brevity, we can understand these two APIs like below:
X.class.isAssignableFrom(Y.class)
If X
and Y
are the same class, or X
is Y
's super class or super interface, return true, otherwise, false.
X.class.isInstance(y)
Say y
is an instance of class Y
, if X
and Y
are the same class, or X
is Y
's super class or super interface, return true, otherwise, false.