Java tutorial
//package com.java2s; import android.util.Log; public class Main { public static boolean checkString(String s) { boolean isEmpty; try { isEmpty = s.isEmpty(); } catch (NullPointerException ex) { Log.e("checkString", "String is NULL !!"); return false; } return !isEmpty; } }