Here you can find the source of isEmpty(String string)
public static boolean isEmpty(String string)
//package com.java2s; public class Main { public static boolean isEmpty(String string) { if (string == null || string.trim().equals("")) { return true; } else {/* ww w .ja va 2 s . c o m*/ return false; } } }