A string is a class that belongs to a reference type.
The decimal default type is double, and it is sufficient to use float in development.
The integer default type is an int basic data type: similar to a normal value.
The Boolean type has only true and false values of two.
Reference data type: The address of the memory is passed
Floating-point types are actually decimals
Try to specify a specific value for each variable in development, and do not use the default value.
The double type can fit the entire universe of data.
Data overflow of type int:
A character type (char) occupies 2 bytes in memory and can be used to hold characters such as English letters. When a computer handles a character type, it treats the characters as a different whole, so the character type is also considered to be an integer type. For example:
such as: Char ch1= ' \ '; Represents a "
char ch2= ' \ \ '; Represents a \
System.out.println ("\" Hello world!\ ""); Output "Hello world!"
Data conversion:
Automatic type conversion: 1. Two types compatible 2. Small Turn-Large
Forced type conversion: Large turn small, front plus "(data type to convert)"
Any type of data is transformed to string
The operations between the byte types are first converted to int, and in the operation, the result is then converted to the byte type.
Java data type + escape character