Java tutorial
/* 10) Trim String. No NullPointerException >>>null */ import org.apache.commons.lang.StringUtils; public class StringUtilsTrial { public static void main(String[] args) { // No NullPointer Exception even if null! System.out.println("10) Trim String. No NullPointerException >>>" + StringUtils.trim(null)); } }