Instance methods can manipulate instance variables of the current object, or they can manipulate class variables, but class methods cannot access instance variables. The instance method must be called by the instance object, and the class method can be called directly by the class name, in addition to being called by the instance object.
In addition, you cannot use this or super in a class method. There are some restrictions on the use of class methods:
1 object variables cannot be referenced in a class method.
2 The super, this keyword cannot be used in a class method.
The 3 class method cannot invoke an object method in a class.
There are few limitations to instance methods compared to class methods:
1 instance methods can reference object variables (which is obvious), or they can reference class variables.
The super, the This keyword can be used in 2 instance methods.
A class method can be called in a 3 instance method.
The difference between class methods and instance methods in Java