Here you can find the source of isEmpty(String s)
public static boolean isEmpty(String s)
//package com.java2s; public class Main { public static final String EMPTY = ""; public static final String NULL = "null"; /**//ww w . j a va 2 s . c o m * Check if string is null or empty. * @return <b>true</b> if string is null or empty */ public static boolean isEmpty(String s) { if (null == s || s.trim().equals(EMPTY) || s.trim().equals(NULL)) return true; return false; } }