String replaceAll() Java

This String class method, replaceAll(), replaces all the occurrences of a word in a string with another word introduced with JDK 1.4 to use with regular expressions. The method returns a new string with affected words. The original string is not disturbed (string is immutable). We discussed a similar program in "String – uppercase, lowercase, …

String replaceAll() Java Read More »