Paul Sanghera and his team would be right.
The answer is:
1. Read the instance variable counter.
2. Return counter.
3. Increment counter by one.
A '++' after the variable mean give me the value and then increment its value. If the '++' was before the variable, then you would be correct.
However consider a variation of this theme using for loops with the following code:
public class test2 {
static int counter = 0;
public static void main(
String[] args) {
for (;counter < 9;++counter)
System.out.print(counter+",");
}
}
Why is the result
0,1,2,3,4,5,6,7,8