+replaceFirst(OldString:string,newString:string);

Return type String
Returns a new string that replaces the first matching substring in this string with the new substring.

import java.lang.String;
class replacefirst{
                            public static void main(String[] args){
                            System.out.println("Welcome : ","Welcome".replaceFirst("e","E"));
                            }
}

Output :   Welcome : WElcome

Popular posts from this blog

Shutdown Pc

Ellipse using OpenGl

String Comparisons