Infosys Interview Question

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