The CSQL language supports the following two types of methods: class and instance methods.
- The class method is a method called by a class object. It is usually used to create a new class instance or to initialize it. It is also used to access or update class attributes.
- The instance method is a method called by a class instance. It is used more often than the class method because most operations are executed in the instance. For example, an instance method can be written to calculate or update the instance attribute. This method can be called from any instance of the class in which the method is defined or of the subclass that inherits the method.
The method inheritance rules are similar to those of the attribute inheritance. The subclass inherits classes and instance methods from the super class. The subclass has only the name of a class or instance method definition inherited from the super class.
The rules for resolving method name conflicts are same as those for attribute name conflicts. For more information about attribute/method inheritance conflicts, see Overview in Class Conflict Resolution.