Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

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
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #java #check #class #subclass
ADD COMMENT
Topic
Name
6+9 =