Hi there!
Has anyone come across this?
When I have a simple debugging output, it is always written twice, e.g. I got a method doing something and want to know, how often it is being called. I have a class variable counter (initialized with 0), and at the very beginning of the method I write
counter++;
System.out.println("nr. of calls: " + counter);
It gives me the correct number, but twice, e.g.:
nr. of calls: 5
nr. of calls: 5
Now this wouldn’t be too bad, but when I declare the variable static, the following is printed:
nr. of calls: 5
nr. of calls: 6
And worse, it isn’t just printed, the variable really HAS been incremented twice then!
Anybody got an idea???
Greetings