Here you can find the source of isPhoneNumber(String inputStr)
public static boolean isPhoneNumber(String inputStr)
//package com.java2s; public class Main { public static boolean isPhoneNumber(String inputStr) { if (inputStr == null) { return false; }//from w ww . ja v a 2s. com if (inputStr.startsWith("1") && inputStr.length() == 11) { return true; } return false; } }