SyntaxFix
Write A Post
Hire A Developer
Questions
Try this: https://docs.oracle.com/javase/1.5.0/docs/api/java/lang/String.html#replace%28java.lang.CharSequence,%20java.lang.CharSequence%29
String a = "HelloBrother How are you!"; String r = a.replace("HelloBrother","Brother"); System.out.println(r);
This would print out "Brother How are you!"