how to maintain the spaces between the characters?

Posted by murali on Stack Overflow See other posts from Stack Overflow or by murali
Published on 2010-03-11T12:37:21Z Indexed on 2010/03/12 6:57 UTC
Read the original article Hit count: 310

Filed under:

hi

i am using the following code

String keyword=request.getParameter("keyword");
keyword = keyword.toLowerCase(); keyword.replaceAll(" "," "); //first double space and then single space keyword = keyword.trim();
System.out.println(keyword); i am given the input as t s but iam getting as [3/12/10 12:07:10:431 IST] 0000002c SystemOut O t s // here i am getting the two spaces how can decrease two single space

thanks,

murali

© Stack Overflow or respective owner

Related posts about autocomplete