Dropbox Interview Question

The questions were related to java. The interviewer asked me to write a code to edit a string in a output.