Java tutorial
import org.apache.commons.lang.StringUtils; public class MainClass { public static void main(String[] args) { //Strip whitespace from start and end of the string. //If null returns empty string System.out.println("13) Strip whitespace >>>" + StringUtils.stripToEmpty(" ABCD ")); } }