实例对象.getClass()
Class aClass = 对象.getClass();
Person person = new Person();
Class c1 = person.getClass();
实例对象.getClass()
Class aClass =类名.class;
Class c3 = Person.class;
Class.forName("类名字符串")
(注意:类名字符串必须是全称,包名+类名)
Class c2 = Class.forName("com.xbky.Person");