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 isSuperclass(final Class<? extends Object> superclass,
            final Class<? extends Object> clazz) {
        if (superclass.equals(clazz)) {
            return true;
        }

        // all classes are superlcass of Object
        if (clazz.equals(Object.class)) {
            return false;
        }

        return isSuperclass(superclass, clazz.getSuperclass());
    }
}