interpre function implementation
You don't need to use recursion here,  commands and args array have the same size you can simply loop through it. 

long result=value;
for (int i=0; i&lt;commands.length;i++) {
   result = calc(result, commands[i], args[i]);
}


And you need to check size of arrays before use, to prevent ArrayIndexOutOfBoundsException

if (commands.length != args.length)
    return -1;


P.S. You work with int, but result can be larger than Integer.MAX_VALUE, therefore use long type for result