String Trim (Beginning Java forum at JavaRanch)
The first thing to do is to check the API for String - do not trust your intuition or "feeling". You will read in the API for the trim method that " XXXXXXX ".trim() returns a new String object. Although the String object will contain the characters XXXXX
www.coderanch.com |