2.1 manipulating objects with references
1. Objects and references can be used to manipulate objects by reference;
2. The reference may also exist separately, that is, there is no connection with any object, and the reference operation without connection with the object will be error-free;
2.2 All objects must be created by you
1. Where to store
Register
Stacks:* fast storage destruction, basic types of storage places
Heap:* constant pool; where the generic object is stored
Constant storage
Non-RAM
2. Exceptions: Basic types
stored in the stack, this variable directly stores the value, so more efficient;
High precision number: biginteger,bigdecimal;
2.3 never have to destroy objects
Garbage collection mechanism
2.4 Creating a new data type: Class
New
Basic type default value: as follows
false char : ' \uoooo ' (null) byte : (byte) o short: (Short ) o int : o long : OL float : o.of
double : O.od
2.5 methods, parameters, and return values
2.6 Building a Java program
*static keyword: the static element has only one memory space , so it is basically no contact with the object, only through the object name can be accessed, do not need to have a specific implementation object;
*Final keyword: Indicates that it cannot be modified, that is, after determining the value of the final element in his defined field, but not in its field (such as two objects of different implementations), the final element can be different;
*static FIANL element: That is, unique and immutable
2.7 Your first Java program
2.8 Annotations and embedded documents
2.9 Coding Style
Everything is Object thinking in Java Chapter II