捡分去查查jdk文档,有详细的说明

解决方案 »

  1.   

    呵呵,还是看API doc明白一点。
      

  2.   

    Instances of the class Class represent classes and interfaces in a running Java application. Every array also belongs to a class that is reflected as a Class object that is shared by all arrays with the same element type and number of dimensions. The primitive Java types (boolean, byte, char, short, int, long, float, and double), and the keyword void are also represented as Class objects. Class has no public constructor. Instead Class objects are constructed automatically by the Java Virtual Machine as classes are loaded and by calls to the defineClass method in the class loader. The following example uses a Class object to print the class name of an object: 
         void printClassName(Object obj) {
             System.out.println("The class of " + obj +
                                " is " + obj.getClass().getName());
         }
     It is also possible to get the Class object for a named type (or for void) using a class literal.For example: 
         System.out.println("The name of class Foo is: "+Foo.class.getName());
      

  3.   

    Class对象也是一种对象,与类的定义相关联。通过类的定义的对象能得到类的对象,通过类的对象也能得到类的定义的对象。