is String Lower Case - Java java.lang

Java examples for java.lang:String Case

Description

is String Lower Case

Demo Code

/***********************************************
 * Copyright to Vivek Kumar Singh * * Any part of code or file can be changed, *
 * redistributed, modified with the copyright * information intact * * Author$ :
 * Vivek Singh * */*from   w w  w .j  a v a2s . c  o m*/
 ***********************************************/
//package com.java2s;

public class Main {
    public static boolean isLowerCase(String s) {
        int strl = s.length();
        int i = 0;
        while (i < strl) {
            char nextC = s.charAt(i);
            if (Character.isLowerCase(nextC) == false)
                return false;
            i++;
        }
        return true;
    }
}

Related Tutorials