Prefix every character in the input string - Java Quiz Question


Given the word as a String, then write a program to prefix every character in the input string.

Input (String, char) Output (String)
Prabhas, K KPKrKaKbKhKaKs
Dhoni, E EDEhEoEnEi
Mother, O OMOoOtOhOeOr
Book, M MBMoMoMk
Welcome, R RWReRlRcRoRmRe



class PrefixEveryCharacterInString
{
    public static void main(String s[])
    {
        System.out.println("After prefixing : " + prefixEveryCharacter("Prabhas", 'K'));

    }


    public static String prefixEveryCharacter(String word, char prefix) {
    }

}