private static String recursiveStringManipulation(String s, char i, int index) {

        // recursive method cutoff, prevents an infinite loop
        if(index < s.length()) {

            modifiedStr = (s.charAt(index) == i) ? modifiedStr.append("*") :
                    modifiedStr.append(s.charAt(index));

            index++;

            // recursive method example.
            return recursiveStringManipulation(s, i, index);
        }

        return modifiedStr.toString();
    }