Convert string to lower Case and handle null value - Android java.lang

Android examples for java.lang:String Case

Description

Convert string to lower Case and handle null value

Demo Code

public class Main{

    public static void main(String[] argv){
        String str = "java2s.com";
        System.out.println(lowerCase(str));
    }/*ww  w  .  j a  v  a2 s.  c  o m*/
    public static String lowerCase(String str) {
        if (str == null) {
            return null;
        }
        return str.toLowerCase();
    }

}

Related Tutorials