How can I write the logic to concatenate all the single latter separated by white space in Java?
For example String “a b c corporation” should be result in “abc corporation”.
How can I write the logic to concatenate all the single latter separated by
Share
Giving pointers – please code yourself !
loop On the array you get from split
3.1 if the value is of lenght 1, append to SB
3.2 if the value is >1 lenght, append with a space in SB.