In Java, what is the most efficient way of removing given characters from a String? Currently, I have this code:
private static String processWord(String x)
You can do this:
tmp.replaceAll("\\W", "");
to remove punctuation