Answers for "java string util if empty default"

0

java string util if empty default

String emptyString = new String();    
result = StringUtils.defaultIfEmpty(emptyString, "default");
System.out.println(result);

String nullString = null;
result = StringUtils.defaultIfEmpty(nullString, "default");
System.out.println(result);
Posted by: Guest on May-20-2020

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language