Java - Write code to check if a string is Empty using multiple or || statements

Requirements

Write code to check if a string is Empty using multiple or || statements

Demo

//package com.book2s;

public class Main {
    public static void main(String[] argv) {
        String str = "book2s.com";
        System.out.println(isEmpty(str));
    }/*w  ww. java 2  s .  co  m*/

    public static boolean isEmpty(String str) {
        boolean flag = false;

        if (null == str || 
            "".equals(str) || 
            "".equals(str.trim())|| 
            "null".equalsIgnoreCase(str)) {
            flag = true;
        }

        return flag;
    }
}