Is it possible to retain information via a helper function with java, without using static variables.
For example,
public void foo(){ int v = 0;
You can pass an object to store the update for each recursive call. Something like the one below.
public static void fooHelper(int depth, HashMap map){ map.put(depth, "Call " + depth); if (depth > 0) { fooHelper(depth-1, map); } return; }