In java int, float and etc., are primitive types. Wrapper classes are used in case we need to use it with generics.
But still the following declaration works in java,
Class<Integer> intClass=int.class
How can we call int.class
even though it is a primitive type?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…