Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Counter {
- private int counter;
- public Counter(){
- this.counter = 0;
- }
- public void decrement(){
- this.counter = this.counter - 1;
- }
- public void printCount(){
- System.out.println(this.counter);
- }
- }
Add Comment
Please, Sign In to add comment