Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to remove white space characters in between the string?

Tags:

java

For example, I want to convert the string test123 test124 test125 to

test123+""+test124+""+test125 or test123test124test125.

How to achieve this?

Thanks

like image 728
Vasu Avatar asked Oct 04 '11 06:10

Vasu


Video Answer


1 Answers

String output = inputText.replaceAll("\\s+",""); 
like image 67
Prince John Wesley Avatar answered Sep 20 '22 18:09

Prince John Wesley