Member variables:
Definition: Variables defined in a class are called member variables
Scope: Valid in the entire class
Classification: Member variables can be divided into instance variables and static variables (plus the keyword static)
class test1 { int a = 33 ; // Instance variable, valid in class test1 static int b = 45 ; // Static variable, valid in the whole program, can be called in other classes }
local variable:
Definition: Variables defined in a method are called local variables
Scope: Effective within the currently defined method, the method call is destroyed, and cannot be called in other classes