how to deisable space in string in java code example Example: remove space string java a = a.replaceAll("\\s+", "");