import org.apache.commons.lang.StringUtils; public class MainClass { public static void main(String[] args) { //If string is null, empty string returned. Else returns trimmed string System.out.println("11) Empty String >>>" + StringUtils.trimToEmpty(null) + "<<<"); } }
11) Empty String >>><<<