I am confused with how can i ‘keep track of stack depth’. Actually, this question relates to the answer https://stackoverflow.com/a/11157985/1010943 on one of my question. The answer was correct and understood but i wasnt able to understand the TIP. The google search also does not reveal any useful information. Bytheway, if it matters then i am using Eclipse IDE
Share
You can keep track of stack depth by including a depth param in your recursive function, or using Thread.getStackTrace()