reverse a string preserving space positions in java

visit shbcf.ru