This week's book giveaway is in the OCMJEA forum. We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line! See this thread for details.
Trim() is basically used to remove the trailing spaces. Suppose you are getting the value from a table and the value in the table is Jeff Kiddyxxx, where xxx refer to extra/trailing spaces stored in the table then calling trim() would return in "Jeff Kiddy".