ClassInfoDemo2.java Source code

Java tutorial

Introduction

Here is the source code for ClassInfoDemo2.java

Source

class ClassInfoDemo2 {
    public static void main(String[] args) {
        Class c = String.class;
        System.out.println(c.getName());

        c = ClassInfoDemo2.class;
        System.out.println(c.getName());

        c = double.class;
        System.out.println(c.getName());

        c = float[].class;
        System.out.println(c.getName());
    }
}