Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

import java.util.Arrays;

public class Main {

    public static void main(String[] args) {
        Class cls = Thread.class;
        System.out.println("Class = " + cls.getName());

        Class[] c = cls.getClasses();
        System.out.println("Classes = " + Arrays.asList(c));

        // returns an array of interfaces
        Class[] i = cls.getInterfaces();
        System.out.println("Interfaces = " + Arrays.asList(i));
    }
}