java.sun.com/.../String.html#trim()
If question is about, what trim( ) does, trim( ) returns a copy of the
string, with leading and trailing whitespace omitted.
Please note trim( ) removes leading and trailing spaces only, not spaces
which are in mid of some letters.
For eg:
str = " s t r ";
str.trim() retruns "s t r" means it does not removes spaces in between
any letters.