How can I write my following code so it does not iterate but use **recursion** instead (i.e. remove the while loop):

```
public static void addSlashes(String str)
{
    int i = 0;

    if (str.length() != 0){
         while (i < str.length()){
              // get character at current 'i' index of string,
              // then adds a "/" after it:
              System.out.print(str.charAt(i) + "/");
              i++;
         }
}

```

Would the while loop in this case be **recursive** or **iterative**? I'm thinking it'd be iterative because it repeats again and again for the length of the string in the parameter.

An example output using this method may be:

```
addSlashes("Hello");

H/e/l/l/o

```