I am trying to measure the execution time for several methods. so I was thinking to make a method instead of duplicate same code many times.
Here is my code:
the simplest way to do this is to pass an interface. So something like
public interface CommonFuncs { public void execute(); ... more functions }
and then in you can have methods that take CommonFuncs as an argument. The implementations of those methods can call the execute method.
execute