Class method
1. Calls to class methods are not dependent on the object and are called directly with the class name [class name Method name]
2. Class method Syntax: + (return value type) method name
3. A class method cannot access a member variable of a class object
4. Object methods can also be called in class methods
5. In general, when you do not access class member variables, you use class methods, which are typically tool classes
6. Use class methods to improve performance and efficiency
Object methods
1. Invocation of the object method depends on the object [object pointer method name]
2. Object method Syntax:-(void) method name
3. The member variables of the class object can be accessed in the object method
Note: Two object methods and class methods with the same name can be used in the same class
Example:-(void) test and + (void) test
The difference between object methods and class methods