Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import android.text.TextUtils;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class Main {

    public static boolean isPuleNumber(String str) {
        if (TextUtils.isEmpty(str)) {
            return false;
        }
        String reg = "^\\d*";
        Pattern pattern = Pattern.compile(reg);
        Matcher matcher = pattern.matcher(str);
        boolean flag = matcher.matches();
        return flag;
    }
}