Java tutorial
//package com.java2s; import android.text.TextUtils; public class Main { public static boolean isMobileNO(String mobiles) { String telRegex = "[1][123456789]\\d{9}"; if (isNull(mobiles)) return false; else return mobiles.matches(telRegex); } public static boolean isNull(String val) { // Log.d("val", val); return TextUtils.isEmpty(val) || "null".equals(val) || null == val; } }