+replace(oldchar,newchar);

Return type String
Returns a new string that replaces all matching characters in this string with the new character.

import  java.lang.String;

class replace{
                     public static void main(String[] arg){
                     System.out.println("Welcome : "+"Welcome".replace('e','E'));
                     }
}

Output:  Welcome : WElcomE

Popular posts from this blog

Shutdown Pc

Ellipse using OpenGl

String Comparisons