Tag: java substring

String replaceAll() Java

September 18, 2011 · 3 min read
###### 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](http://way2java.com/string-and-stringbuffer/introduction-immutable-nature-comparison/)).