public class ReplaceExample1
{
public static void main(String args[])
{
String s1="gulzar group of Institutes Khanna, Ludhiana";
String s2 =s1.replace('g','G');
System.out.println("Original String = " + s1);
System.out.println("\nAfter converting g into G the new string is");
System.out.println("\nNew String = " + s2);
}
}
No comments:
Post a Comment
Note: only a member of this blog may post a comment.