First diagram (citation: Deep Java Virtual machine)
There are two types of data in Java, basic types (byte, short, char, int, float, double, long, Boolean) and reference types (class references, interface references, array references).
1. The base type is the type of operand that can be stored in the method stack and may not be stored in the heap area. The reference type simply stores the address of the heap in the stack (which can also be interpreted as a pointer).
2. Basic type There is a returnaddress (keep, wait for me to read the continuation), is used to execute the finally statement.
3. Byte, short, Char, and Boolean in the base type are calculated as int values, and the completion of the operation is then dumped into the corresponding type data.
The basic type data range is as follows:
The 1.char type is indeed two bytes, please refer to http://www.cnblogs.com/akgang/p/8057356.html for details.
Java Data types