Dynamically find the class that represents a primitive Java type
The Class instances for the primitive types are obtainable as you said using e.g. int.class, but it is also possible to get the same values using something like Integer.TYPE. Each primitive wrapper class contains a static field, TYPE, which has the corresponding primitive class instance. You cannot obtain the primitive class via forName, but you … Read more