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 hasSuperClass(Class<?> obj) {
        Class<?> SuperClass = obj.getSuperclass();
        if (SuperClass == null || obtainClassName(SuperClass).contentEquals("Object"))
            return false;
        return true;
    }

    public static String obtainClassName(Class<?> obj) {
        return obj.getSimpleName();
    }
}