Question d’entretien chez Apple

Write a java program to replace a new string in place of old string from Input string.