1. Class definition and implementation

As shown in figure:

Member variables: Variables declared in {} in a class definition or class implementation are member variables.

An instance variable is a special type of member variable. An instance variable is essentially a member variable, but an instance is a declaration of a class. If a member variable has a class type, then such a member variable is an instance variable

Properties: Properties are accessed via dot syntax for the convenience of class objects.

Member variables are variables that are used inside the class (do not generate setters and getters) and do not need to contact the outside world.

The setter and getter methods and underlined member variables are automatically generated during property creation. You can set read-only or writable, and the setting method can also be customized. Properties are variables that are used to provide external access.

Conclusion:

    1. Defined in {} sign to remove baseData type int float....And so on. All other types of variables are calledThe instance variables.

    Instance variable + basic data type variable = member variable

    1. Member variablesNot externally accessible, if requiredCustom setter and getter methodsorDefine variables as properties