Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

public class Main {
    public static final String PHONE_PATTERN = "^[+]?[0-9 ()-]{10,26}$";

    public static boolean isPhoneNumberValid(String phone) {
        return phone.matches(PHONE_PATTERN);
    }
}