Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

public class Main {
    private static boolean isAssignableFrom(Class<?> clazz, Class<?> iClazz) {
        if (iClazz.isAssignableFrom(clazz)) {
            return true;
        } else if (clazz.getSuperclass() != null) {
            if (iClazz.isAssignableFrom(clazz.getSuperclass())) {
                return true;
            } else {
                return isAssignableFrom(clazz.getSuperclass(), iClazz);
            }
        } else {
            return false;
        }
    }
}