previous
|
start
|
next
Self Check
If
a
refers to a bank account, then the call
a.deposit(100)
modifies the bank account object. Is that a side effect?
Consider the
DataSet
class of Chapter 7. Suppose we add a method
void read(Scanner in)
{
while (in.hasNextDouble())
add(in.nextDouble());
}
Does this method have a side effect?
previous
|
start
|
next