'Java program to print any letter in a given string twice

I am done with this code but I need to get printed only selected letter not only the first letter, if suppose I take letter m it should be printed twice with the string.enter image description here

So please help me to do that code.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source