I want to replace all the characters in a Java String with * character. So it shouldn\'t matter what character it is, it should be replaced with a *
*
System.out.println("foobar".replaceAll(".", "*"));