+replaceAll(old string:string,newstring:string);
Return type String.
Returns a new string that replaces all matching substrings in this string with the new substring.
import java.lang.String;
class replaceAll{
public static void main(String[] arg){
System.out.println("Welcome : "+"Welcome".replaceAll("e","EL"));
}
}
Returns a new string that replaces all matching substrings in this string with the new substring.
import java.lang.String;
class replaceAll{
public static void main(String[] arg){
System.out.println("Welcome : "+"Welcome".replaceAll("e","EL"));
}
}
Output: Welcome : WELlcomEL