java string is null or empty

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

Also in Java: