Methods
A method is a piece of code that implements the behavior of a particular message for a class. The system manages each method as a separate software component. Whenever you change the source code of a method, the system replaces the existing edition of that method with your changes.
You can specify methods for a class or for an instance of a class. Class methods are sent to the class itself. a classic example is new which answers an instance of the class. Instance methods are sent to individual instances of a class. For example, if objects of a class have a property like width, each instance would answer a width unique to itself.
Also, you can specify that a method be public or private. Whether you specify a method as being public or private does not affect use of the method. Public and private are merely conventions for organizing code. For example, you might adopt the following conventions: a method is public if it has a definition that you can view and use in other classes or instances; a method is private if it is accessible only by its containing class and is used only to implement a behavior.
Last modified date: 06/18/2018