ClassInfoDemo1.java Source code

Java tutorial

Introduction

Here is the source code for ClassInfoDemo1.java

Source

// ClassInfoDemo1.java

class ClassInfoDemo1 {
    public static void main(String[] args) {
        String s = "";

        Class c = s.getClass();
        System.out.println(c.getName());

        c = new ClassInfoDemo1().getClass();
        System.out.println(c.getName());
    }
}