Answers for "how to check if string is empty in if condition in java"

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 "how to check if string is empty in if condition in java"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language