Month: September 2015

Replace mulitple characters in a Java string

In Java Strings are immutable, so you cannot change something in a String without creating a new one.

Manipulation of characters at certain positions can be done best by using the StringBuilder class. It is a special class for String manipulation and creation. more