Here you can find the source of isEmpty(String input)
public static boolean isEmpty(String input)
//package com.java2s; public class Main { public static boolean isEmpty(String input) { if (input == null || "".equals(input)) return true; for (int i = 0; i < input.length(); i++) { char c = input.charAt(i); if (c != ' ' && c != '\t' && c != '\r' && c != '\n') { return false; }//from www .ja v a2s . c om } return true; } public static boolean equals(String str1, String str2) { return str1 == str2 || str1 != null && str1.equals(str2); } }