Grismar
0
Q:

check if string is null or empty java

if(str != null && !str.isEmpty()) { /* do your stuffs here */ }
2
public class Null {
 
	public static boolean isNullOrEmpty(String str) {
        if(str != null && !str.isEmpty())
            return false;
        return true;
    }
}
-1

New to Communities?

Join the community