+trim()
Return type String
Returns a new string with blank characters trimmed on both sides.
import java.lang.String;
class trim{
public static void main(String[] arg){
System.out.pringln(" Welcome :"+" Welcome ".trim());
}
}
Output: Welcome :Welcome
Returns a new string with blank characters trimmed on both sides.
import java.lang.String;
class trim{
public static void main(String[] arg){
System.out.pringln(" Welcome :"+" Welcome ".trim());
}
}
Output: Welcome :Welcome