#sleela 2.1 // Regression: class fields must be stored per object and instance methods // must receive the target object as their hidden first argument. class DispatchCounter { int value; int increment() { value = value + 1; return value; } int current() { return value; } } class ClassDispatchRegression { static void main() { DispatchCounter first = new DispatchCounter(); DispatchCounter second = new DispatchCounter(); print(first.increment()); print(first.increment()); print(second.current()); print(second.increment()); print(first.current()); } }