Skip to content

Instantly share code, notes, and snippets.

Created December 2, 2020 03:39
What would you like to do?
public class Counter {
// counter variable, only visible in the class.
private int counter;
public Counter() {
this.counter = 0;
// N - return current counter's value.
public int N() {
return this.counter;
// Other methods are omitted.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment