Results 1 to 1 of 1
Thread: String trim
The code snippet below shows the use of trim method. The method trim removes extra spaces before and after the sting. It has nothing to do with the spaces in between the String words.
String str = " Java practice session. "; System.out.println(str.trim());
Java practice session.
- By baltimore in forum New To JavaReplies: 2Last Post: 09-18-2008, 07:30 AM
- By gamst in forum AWT / SwingReplies: 0Last Post: 02-07-2008, 10:08 PM
- By Java Tip in forum Java TipReplies: 0Last Post: 11-20-2007, 05:59 PM
- By trill in forum New To JavaReplies: 1Last Post: 08-07-2007, 07:29 AM
- By mathias in forum Java AppletsReplies: 1Last Post: 08-03-2007, 10:52 AM