13-from scratch to JavaWeb-complete interpretation of member variables and local variables, 13-javaweb-
Tutorial video:
1. Variable Division
2. member variables and local variables
3. Scope and lifecycle of Variables
I. variable definition
Data type variable name = value;
Ii. Variable Classification
Variables can be divided into two types based on their defined locations:
1. member variables: variables directly defined in the class
2. Local variables: variables defined in methods or code blocks
Iii. Variable Initialization
Variables are initialized to open up space in the memory.
One member variable has a default value and the other has no default value.
Member variables can be used directly.
If you do not set an initial value for a local variable, an error is reported if you use it directly.
Iv. variable scope
The range that can be used after the variables are defined
V. Variable Lifecycle
Vi. Notes on variables
Follow the following code: "Xiaoqiang code"
Get the latest update video and
"Code + software + Xmind notes" in the "Code ant Java learning communication group: 625973026" File Sharing
Netease cloud: ClickIt is recommended to watch online at a high speed.