Mistři v programování na #hovnokod

Java #4701

...since we're counting

class MutableInt {

    int value = 1; // note that we start at 1 since we're counting

    public void increment() {
        ++value;
    }

    public int get() {
        return value;
    }

    public String toString() {
        return String.valueOf(value);

    }
}

Anonymous,