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