It is said that everything in Java is an Object at the same time the Java Programming Language is meant to be simple. Since the primitive data types consume less memory and can be accessed faster, they are not objects. The equivalent Wrapper classes are also available in java like "Integer" "Short" etc. They can be used as objects if you want. However, the wrapper classes will be stored in Heap and they are slow.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…