This chapter does not have much to summarize, if not extended. Some of the previously unnoticed details can be written down.
1. Location of data storage
(1). Register. The program cannot control.
(2). Stack. The reference to the object. Basic type.
(3). Heap. various objects.
(4). Constant storage. and the code together.
(5). Non-RAM storage. Mainly refers to the stream object and the persisted object, the former prepares the network transmission, the latter is thrown on the hard disk.
The array in 2.java is automatically initialized:
(1). Primitive type array elements are initialized to 0
(2). The reference type array element is initialized to null
3. Variable Scope
(1). The basic type is the same as C
(2). When a reference type is scoped, the variable that references the object disappears, and the object itself does not disappear immediately.
4. Member variables are automatically initialized, and local variables do not.
After that, the static methods and variables, namespaces, and some of the annotations are simply not interesting.
Java programming Thought--chapter II everything is an object