Java tutorial
//package com.java2s; public class Main { public static boolean isEmpty(final String string) { if (null == string || !string.matches(".*\\S+.*")) { return true; } return false; } }