Java tutorial
//package com.java2s; public class Main { /** * adjust string: * if string is null,or string's length is 0,return true, * @param strMsg * @return */ public static boolean stringIsEmpty(CharSequence strMsg) { if (strMsg == null || strMsg.length() == 0) return true; return false; } }