Hello. I need to write a static recursive method that returns the frequency of occurrence a particular digit d in an integer n. For example, if passed (1342457,4) it should return 2, whereas when passed (1342457,6) it should return 0.
I won't put my code in as it is arbitrary, I just need help with the logic in this one; I can't grasp what needs to be done.
I should also note that no variables are allowed besides the two that the user inputs as the integer, and digit to be checked for (so it must be calculated completely recursively).