Java, as a strongly typed language, means that each variable will have a specific type, there are 8 basic types of Java, there are 4 types of integers (byte, short, int, long), two floating-point types (float, double), 1 character types (char) and a Boolean (Boolean), it is worth noting that although string strings are very common, it is not a basic type.
Three , character type (connected to the floating-point type)
The char type is used to represent a single character, the Unicode encoding unit can be represented as 16 decimal, the range is a 16-bit Unicode character set from the char type in the \u0000~\uffff,java, and is used when using quotation marks in English, such as ' A ';
Unless you do need to operate on UTF-16 code units, it is not recommended to use the char type in your program, because the encoding mechanism used with the char type is far too old to satisfy the current application, although the type of char has been improved. However, in some cases, there are special problems that are known to occur when the database char type corresponds to a char type in Java, and in some special queries. It is recommended to use string to handle character types, in fact string in Java is based on a char array, which we will refer to later.
Four , Boolean type
Feel the Boolean type there is nothing to say Ah, is true and false, even its packaging class are simple to die, do not tell what, there is a friend who has doubts to leave a message.
Looking back, Java restudying (v): Character type of Java basic data type