Ok. I'll move this to a Java forum rather than a JavaScript one then.
With recursion you have a base case and a recursive case. What do you think they should be there?
My question still applies. What do you think for these two things? It's ok to be wrong, but you are going to have to contribute some information to get help. Bear and I know how to do this. Feeding you the answer without you showing some thinking isn't going to teach you anything.