Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

better way to check string on null and empty java

/* You can use Apache Commons  */
StringUtils.isEmpty(str)
  
/* which checks for empty strings and handles null gracefully. */
  
/*   HINT   */  
/* the shorter and simler your code, the easier it is to test it */
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #check #string #null #empty #java
ADD COMMENT
Topic
Name
4+1 =