I'm looking for a way to get a method to keep track of how many times it's been called. Hopefully this is the right forum.
Printable View
I'm looking for a way to get a method to keep track of how many times it's been called. Hopefully this is the right forum.
You could use an instance variable:
Code :private int fooCalled; public void foo() { fooCalled++; // more stuff here }