Answers for "java check if instance of subclass"

1

java check if instance of subclass

subclass instanceof superclass
Posted by: Guest on July-20-2021
0

java check if class is subclass

boolean is_subclass = Superclass.class.isAssignableFrom(Subclass.class);
// example:
// List.class.isAssignableFrom(LinkedList.class) is true
// List.class.isAssignableFrom(HashMap.class) is false
Posted by: Guest on May-19-2021

Code answers related to "java check if instance of subclass"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language