Android examples for Phone:Phone Number
Is Valid Phone Number by length
//package com.java2s; public class Main { public static boolean IsValidPhoneNumber(String phoneNumber) { // validating for length if (phoneNumber.length() != 10) return false; // validating for numeric try {//ww w.ja v a2s. com Long.parseLong(phoneNumber); } catch (Exception e) { return false; } return true; } }