Java tutorial
//package com.java2s; public class Main { public static boolean isEmpty(String s) { if (s == null || "".equals(s)) { return true; } for (int i = 0; i < s.length(); i++) { char c = s.charAt(i); if (c != ' ' && c != '\t' && c != '\n') { return false; } } return true; } }