We can get class Class object by 3 methods:
I don\'t understood the di
Class.forName("className");
It dynamically load the class based on fully qualified class name string.
obj.getClass
Returns the java.lang.Class object that represents the runtime class of the object.
MyClass.class:
A class
literal is an expression consisting of the name of a class, interface, array,
or primitive type, or the pseudo-type void, followed by a
'.' and the token class.
The type of C.class
, where C is the name of a class, interface, or array type is Class
.
http://docs.oracle.com/javase/specs/jls/se7/jls7.pdf