Java - Write code to create a function to check if a string is Null Or Empty

Requirements

Write code to create a function to check if a string is Null Or Empty

Demo

//package com.book2s;

public class Main {
    public static void main(String[] argv) {
        String value = "book2s.com";
        System.out.println(isNullOrEmpty(value));
    }/*from  w  w  w.  j  a  va 2s  . c om*/

    public static boolean isNullOrEmpty(String value) {
        return value == null || value.trim().length() == 0;
    }
}