java how can I measure method call times?
问题 I have a simple class and I would like to measure method call times how can I do that? Looking for generic way to achieve that so I can apply it to more difficult classes as well. Thank you import java.io.*; import java.util.*; public class Turtle { private String name; private Formatter f; public Turtle(String name, Formatter f) { this.name = name; this.f = f; } public void move(int x, int y) { f.format("%s The Turtle is at (%d,%d)\n", name, x, y); } public static void main(String[] args) {