Computer Science, asked by sreyashiganguli09, 3 months ago

(h) String s =”Yndya ys yn Asya”. Write java statements using String class

methods to change the String into “India is in Asia”.

Answers

Answered by Oreki
10

\text{\bf\large Given Snippet}

\texttt{String s = "Yndya ys yn Asya";}

\text{\bf\large Required statements}

\texttt{String newString = s.replace("Y", "I").replaceAll("y", "i");}

Similar questions