Hi.
I have a project that have a recursive method. this method is a search method in a tree.
I want to return from depth n in tree.In other words,when mothod is called n time and find asolution in depth of n, runing method is stopped and return to main method and first call in stack.
plz help.
Thanks.

Return from recursive method !
cica
SteffenK
This is simple: you can pass depth counter to the method params or you can declare field in the class and keep counter there.