Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

import java.security.ProtectionDomain;

public class Main {

    public static void main(String[] args) throws Exception {

        Class cls = Class.forName("Main");

        // returns the name of the class
        System.out.println("Class = " + cls.getName());

        // returns the ProtectionDomain of this class.
        ProtectionDomain p = cls.getProtectionDomain();
        System.out.println(p);

    }
}