java : string check ”” OR null


package homeWork;

import org.apache.commons.lang3.StringUtils;

public class stringCheck {

public static void main(String[] args) {
// TODO Auto-generated method stub
String strEmptyStr="";
String strNullObject =null;

System.out.println("no size string-----");
//String method
System.out.println(strEmptyStr.isEmpty());
//StringUtils
System.out.println(StringUtils.isEmpty(strEmptyStr));

System.out.println("null----");
//String method
// System.out.println(strNullObject.isEmpty());
//StringUtils
System.out.println(StringUtils.isEmpty(strNullObject));
}
}

result

no size string-----
true
true
null----
true