Find Blank and Empty String

Java-Find Blank and Empty String

Find Blank and Empty String The String class provides two methods, isBlank() and isEmpty(), that used to find if the string is empty or blank. The isBlank() method returns true if the string is empty or contains only white space codepoints, otherwise false. The isEmpty() method returns true if, and only if, length() is 0. For examples: … Read more…

TreeSet : subSet(), isEmpty(), pollFirst()

The subSet() methods returns a view of the portion of this set whose elements range from fromElement, inclusive, to toElement, exclusive. The isEmpty() methods returns true if this set contains no elements. The pollFirst() methods retrieves and removes the first (lowest) element, or returns null if this set is empty. Program       Program Source import java.util.TreeSet; public class Javaapp … Read more…