public class Counter extends Object
Constructor and Description |
---|
Counter()
Initializes the value of this counter to zero.
|
Modifier and Type | Method and Description |
---|---|
void |
increment()
Increments the value of this counter by 1.
|
boolean |
reachedLimit()
Tests whether the value of this counter has reached the limit 5.
|