Implementing
functionality (cont.)
n
Queries perform one action which is to
give the value of a component variable.
n
Example:
n
public int
count () {
n
return
tally;
n
}
n
Every query ends with the execution of a
return statement.
n
Syntax:
return
expression
n