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.
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.