import java.lang.*;
public class StringTrim{
public static void main(String[] args) {
System.out.println("String trim example!");
String str = " RoseIndia";
System.out.println("Given String :" + str);
System.out.println("After trim :" +str.trim());
}
}
Output:
String trim example!
Given String : RoseIndia
After trim :RoseIndia
Source:
http://www.roseindia.net/java/beginners/StringTrim.shtml
No comments:
Post a Comment