As mentioned, objects may execute actions that manipulate the object and other objects in a given system. Methods are one way of representing activities related to an object. A method is a template for activities with identical structure. The description of a method consists of a sequence of statements where each statement describes one or more actions that take place when the method is executed. In addition, a method may contain a number of local data-items, and as we shall se later also local methods and local classes. Local attributes are defined within a method when they are only meaningful in the context of the method.
A statement may contain expressions, which are syntactic element that may be evaluated/executed to determine values. We start by describing expressions.