Hello !

As I wrote in the title.

I'm looking for a Java command wchich is simmilar to ' tr -s" " ' in UNIX.

tr -s"[sequence]" : Replace each input sequence of a repeated character that is listed in SET1 with a single occurrence of that character.

thanks for any help.

Are you talking about programming stand point or command line? I don't think there is a command line for that as in UNIX. If it is programming, it depends on your input. If it is just pure String, you can implement a static class/method using replaceAll() with regular expression. If it is a customized class, you have to deal with the class first.