package study.hard.javalib.nativelib;

public class GetClassTest {

	public static void main(String[] args) {
		GetClassTest tester = new GetClassTest();
		ExtendedClassA extendedA = tester.new ExtendedClassA();
		extendedA.printClass(); // class study.hard.javalib.nativelib.GetClassTest$ExtendedClassA
	}

	public class ClassA {
		public void printThisClass() {
			System.out.println(getClass());
		}
	}

	public class ExtendedClassA extends ClassA {
		public void printClass() {
			printThisClass();
		}
	}

}

@@ -296,16 +296,112 @@
 edClassA
+%0A%0A%09%09Class%3C? extends ClassA%3E clazz = extendedA.getClass();%0A%09%09System.out.println(clazz.getName());
 %0A%09%7D%0A%0A%09pu

Add some codes to test Class object.