Switch to full style
General Java code examples
Post a reply

Check empty string

Sat May 22, 2010 10:13 pm

following code check if the passed string is empty or null :

Code:
public boolean emptyString(String str){
          if (
str==null || str== 0) {
        return 
true;
    }

    return 
false;
  } 




Post a reply
  Related Posts  to : Check empty string
 check empty number     -  
 [Ajax/PHP] Registration - Check for empty textboxs     -  
 check if string start with a specific sub-string in PHP     -  
 check if string ends with specific sub-string in php     -  
 lesson6: XSD Complex Empty Elements     -  
 Splitting a String Based on a Found String     -  
 recursive string reversal- reverse string     -  
 String token for string split     -  
 Pad a string to a certain length with another string     -  
 Check DNS error     -  

Topic Tags

Java Strings