public class Counter
extends java.lang.Object
Constructor and Description |
---|
Counter() |
Modifier and Type | Method and Description |
---|---|
int |
decrement()
Decrements the count by one, if count is greater than zero, and returns the count.
|
int |
get()
Returns the count.
|
int |
increment()
Increments the count by one and returns the count
|
void |
reset()
Resets the count to 0.
|
public int increment()
public int decrement()
public int get()
public void reset()