.getClass()和.class的区别 .getClass()和.class的区别如下: TestClass t=new TestClass (); t.getClass(); TestClass .class .getClass()是实例所用,.class是类所用