Details
Description
Prior to JDK 6, we can check if a string is empty by doing "".equals(s) or s.equals("").
Starting from JDK 6, String class has a new convenience and efficient method isEmpty() to check string's length.
Prior to JDK 6, we can check if a string is empty by doing "".equals(s) or s.equals("").
Starting from JDK 6, String class has a new convenience and efficient method isEmpty() to check string's length.