has Lowercase Character in string - Android java.lang

Android examples for java.lang:Character

Description

has Lowercase Character in string

Demo Code

public class Main{
    public static boolean isNotEmpty(CharSequence str) {
        if (str != null && str.length() > 0) {
            return true;
        }/*from w  w w .  j a  va 2 s .c  o  m*/
        return false;
    }
    public static boolean hasLowerChar(CharSequence str) {
        if (isNotEmpty(str)) {
            for (char c : str.toString().toCharArray()) {
                if (c >= 'a' && c <= 'z') {
                    return true;
                }
            }
        }

        return false;
    }

}

Related Tutorials