Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

public class Main {
    public static boolean isSubclassOf(Class<?> targetClass, Class<?> superClass) {
        if (targetClass.getSuperclass() != null) {
            return targetClass.getSuperclass().equals(superClass)
                    || isSubclassOf(targetClass.getSuperclass(), superClass);
        }
        return false;
    }
}