considering we have following strings and we are going to write them into a text file:
String a=" "
String b=" "
String c="java "
String d=" java"
String e="java"
but because a and b has no character , we have no interest to insert them into the file.
maybe here its easy to see them and ignore them, but what if there is a DOM tree and we get nodes text one by one and because of lots of white spaces in the page, there are lots of white space strings like [#text: ] in the DOM .
what is the way to find out strings like a and b as blanks and then ignoring them to right it into a text?
or
or
or
(that one needs Jakarta Commons Lang). I personally go with the last one as it’s
null-safe to boot.