I have an input that recieves a String in java:
"a a"
(50 characters total, 2 letters and 48 whitespaces)
when i tried
replace("\\s++","");
or
replaceAll("\\s+","");
removes the whitespaces, but keeps on the string(char array) with '\u0000' 0 How i remove this to make the string only with 2 characters?