一、Class c = Class.forName("完整类明带包名");
Class c1 = null;
try {
c1 = Class.forName("java.lang.String");
} catch (ClassNotFoundException e) {
e.printStackTrace();
}
二、Class c = (对象)引用.getClass();
String s = "aaa";
Class x = s.getClass();
三、Class c = 任何类型.class;
Class z = String.class;