Article directory
Thirty-one, IntelliJ IDEA installation
IntelliJ IDEA (IDEA) or eclipse is more convenient to manage our projects.
IDEA is installed according to the tutorial in [1] Basic concepts of JAVA . The following figure shows the configuration of associated files in the process:
Thirty-two, IDEA runs the first program
1. Create a new empty project
2. Create a new module
3. Create a new package (com.) in src
4. Create a new class in the package
5. Write code
6. Execute
Thirty-three, IDEA project structure
Thirty-four, IDEA content auxiliary keys and shortcut keys
Thirty-five, IDEA module creation, deletion and import
1. Create: new module
2. Delete: remove module or delete the file directly
3. Import: Import module
Thirty-six, array
Definition: Array (array) is a storage type used to store multiple data of the same type .
Format 1: data type [] variable name
format 2: data type variable name [] (not recommended)
array initialization:
dynamic initialization: only specify the length of the array during initialization, and the system assigns the initial value to the array
static initialization: specify each The initial value of the array element, the length of the array is determined by the system
Format: data type [] variable name = new data type [] {data 1, data 2,...}; simplified
format: data type [] variable name = {data 1, data 2,…};
Note: 1. Get the number of arrays: array name.length
2. Common errors in arrays: index out of bounds and null pointer
Thirty-seven, memory allocation
This involves the concept of the stack :
the stack can be simply understood as the address pointing to the heap