Android determines whether the character is empty

method one 

 public static boolean isEmpty(String str){
        if(str==null||"".equals(str)){
            return true;
        }
        return false;
    }

Method Two

TextUtils.isEmpty("需要判断的字符串");

 

Guess you like

Origin blog.csdn.net/a451319296/article/details/109409318