The methods of a class come in two varieties:
Knowing the situation with instance and class variables, you can guess easily: methods designated static are class methods, and non-static are instance ones.
An instance method can only be invoked with an object of the class, so it is bound to an object. If we invoke an instance method on a particular object, the method will access the instance variables belonging to the object on which it was invoked. It is very important to know, that the methods of a class have direct access to the member variables of the same class, paying no attention to their control access like public, private, protected.
Class methods can only access other class members (class variables or other class methods). They cannot access instance variables or instance methods.
The most important thing about class methods is that they can be accessed using the name of the class without a requirement to instantiate an object of the class. As with class variables, class methods can be accessed by joining the name of the class to the name of the method using the appropriate joining operator.