Simple code to check is String Variable Having Null/EmptyStr..

String str="Tilak";
        if(!(str == null) && !(str.length() == 0))
        System.out.println("---String Value---"+str);
        else
            System.out.println("---Null/Empty String---");

Comments

Popular posts from this blog

Custom Dialog with no title and full screen in Android

Best working code to set Date limits on Date Picker Dialog,in Android

code to display .pdf,.text,.DOC,.DOCX,.doc extension files exists in SDCard