Java has a total of 8 basic types, byte byte, 8 bits, short shorter integer, 16 bit, int integer, 32 bit, long integer, 64 bit, float single precision floating point, 32 bit, double dual precision floating point, 64 bit, char character type, 16 bit And a Boolean Boolean type. So, what are the basic types that can represent numbers? It's obvious that byte,short,int,long,float,double is all right, and the question is whether Char and Boolean are allowed. So I'm going to tell you that char type can, because all the characters behind it all correspond to this string of numbers, you define a character is actually quite with the definition of a string of numbers, so the char type can represent a number, but char cannot represent negative numbers, its value range is (0~65535) (0~2^ 16-1). The only basic data type that cannot represent numbers is the Boolean type. In c it is possible to perform operations such as while (1), whereas in Java it can only be while (true), which is the difference between C and Java.
What are some of the basic data types in Java that can represent numbers?