Java 8 Retirez les espaces de la chaîne
a.replaceAll("\\s+","");
2 Programmers 1 Bug
a.replaceAll("\\s+","");
String withSpaces = " Hi ";
String withoutSpaces = withSpaces.trim();
String str = "Hello ";
System.out.println(str.trim()); // "Hello"