//Program to show working of replace () method 

//executed in textpad (Java editor)


public class check

{

public static void main(String arg[])

{

String x="AdityA";

System.out.println(x.replace("Adi","4"));

}

}


// Output: 4tyA

Comments