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()); } }