is String Null Or Empty - Android java.lang

Android examples for java.lang:String Null or Empty

Description

is String Null Or Empty

Demo Code



public class Main{


    public static boolean isNullOrEmpty(String str) {
        return str == null || str.trim().length() == 0;
    }//from   w  ww . j  a  v  a 2  s .  c  om

}

Related Tutorials