Look at the source code for the Integer class, just stumble on this line below
Class<Integer> TYPE = (Class<Integer>) Class.getPrimitiveClass("int");
And getPrimitiveClass is its own method.
static native Class getPrimitiveClass(String name);
Why did he become a native method? really want to know.
How to create an instance for Class ? Does this differ in the usual way to create an instance for ex: Ex e = new Ex() ?
source share