Object-Basic consolidation and object Consolidation
1. Object Instantiation Process
1) declaration reference
2) use new to create class objects and initialize (allocate memory space)
3) object pointing to the class
Simple Example:
A a = new ();
B B = null;
C c;
2. Understanding of the mean value type and reference type of object type
The memory is divided into two areas: Stack and heap. The stack has a certain storage space and is used to store value types, only the reference addresses (hash codes) of the basic data type and object type can be stored ). The size of data stored in the stack must be within the controllable range of the stack. The values of the basic data types stored in the stack are of the maximum and minimum values, such as int and float; the Heap has a large storage space and is used to store "array type", "string type", and "Object Type" data. The referenced data types stored in the heap are not of a fixed size, variables of the String type can contain 1 or 2 characters... more characters, no matter how much you store, it will open up a space for storing your stored data in the memory heap, and a space for storing the reference address in the stack, when you call it, the compiler will point to the data stored in the memory heap based on the reference address stored in the stack.
The basic skills of the basic person are consolidated. If this is not the case, please point it out and change it later.