Java tutorial
//package com.java2s; import android.text.TextUtils; public class Main { public static boolean isEmpty(CharSequence target) { target = target.toString().trim(); return TextUtils.isEmpty(target); } }