Question d’entretien chez Infosys

Using Java 8 asked to write a program to modify the string