对象名.getClass(),与类名.class所得到的字符串相同:
String a = new String("aaa"); System.out.println(a.getClass() == String.class); //返回true