Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
import android.text.TextUtils;

public class Main {

    public static boolean checkTelephone(String telephone) {
        if (TextUtils.isEmpty(telephone)) {
            return false;
        } else if ((telephone.startsWith("86") && telephone.length() == 13)
                || (!telephone.startsWith("86") && telephone.length() == 11)) {
            return true;
        }
        return false;
    }
}