欧美一区二区三区老妇人-欧美做爰猛烈大尺度电-99久久夜色精品国产亚洲a-亚洲福利视频一区二区

怎么用JAVA驗證身份證號碼有效性

這篇文章主要介紹了怎么用JAVA驗證身份證號碼有效性的相關(guān)知識,內(nèi)容詳細易懂,操作簡單快捷,具有一定借鑒價值,相信大家閱讀完這篇怎么用JAVA驗證身份證號碼有效性文章都會有所收獲,下面我們一起來看看吧。

創(chuàng)新互聯(lián)堅持“要么做到,要么別承諾”的工作理念,服務(wù)領(lǐng)域包括:做網(wǎng)站、成都網(wǎng)站建設(shè)、企業(yè)官網(wǎng)、英文網(wǎng)站、手機端網(wǎng)站、網(wǎng)站推廣等服務(wù),滿足客戶于互聯(lián)網(wǎng)時代的巧家網(wǎng)站設(shè)計、移動媒體設(shè)計的需求,幫助企業(yè)找到有效的互聯(lián)網(wǎng)解決方案。努力成為您成熟可靠的網(wǎng)絡(luò)建設(shè)合作伙伴!

一、身份證結(jié)構(gòu)和形式

在通用的身份證號碼有15位的和18位的;

15位身份證號碼各位的含義:

1、1-2位省、自治區(qū)、直轄市代碼;

2、3-4位地級市、盟、自治州代碼;

3、5-6位縣、縣級市、區(qū)代碼;

4、7-12位出生年月日,比如670401代表1967年4月1日,與18位的第一個區(qū)別;

5、13-15位為順序號,其中15位男為單數(shù),女為雙數(shù);

18位身份證號碼各位的含義:

1、 1-2位表示省(自治區(qū)、直轄市、特別行政區(qū))。

2、 3-4位表示市(地區(qū)、自治州、盟及國家直轄市所屬市轄區(qū)和縣的匯總碼)。其中,01-20,51-70表示省直轄市;21-50表示地區(qū)(自治州、盟)。

3、 5-6位表示縣(市轄區(qū)、縣級市、旗)。01-18表示市轄區(qū)或地區(qū)(自治州、盟)轄縣級市;21-80表示縣(旗);81-99表示省直轄縣級市。

4、 7-14位【生日期碼】表示編碼對象出生的年、月、日,其中年份用四位數(shù)字表示,年、月、日之間不用分隔符。例如:1981年05月11日就用19810511表示。

5、 15-17位【順序碼】表示地址碼所標識的區(qū)域范圍內(nèi),對同年、月、日出生的人員編定的順序號。其中第十七位奇數(shù)分給男性,偶數(shù)分給女性。

6、 18位【校驗碼】,作為尾號的校驗碼,是由號碼編制單位按統(tǒng)一的公式計算出來的,如果某人的尾號是0-9,都不會出現(xiàn)X,但如果尾號是10,那么就得用X來代替,因為如果用10做尾號,那么此人的身份證就變成了19位,而19位的號碼違反了國家標準,并且中國的計算機應(yīng)用系統(tǒng)也不承認19位的身份證號碼。Ⅹ是羅馬數(shù)字的10,用X來代替10,可以保證公民的身份證符合國家標準。

二、 18位身份證號碼計算方法

1、將前面的身份證號碼17位數(shù)分別乘以不同的系數(shù)。從第一位到第十七位的系數(shù)分別為:7-9-10-5-8-4-2-1-6-3-7-9-10-5-8-4-2。

2、將這17位數(shù)字和系數(shù)相乘的結(jié)果相加。

3、用加出來和除以11,看余數(shù)是多少?

4、余數(shù)只可能有0-1-2-3-4-5-6-7-8-9-10這11個數(shù)字。其分別對應(yīng)的最后一位身份證的號碼為1-0-X -9-8-7-6-5-4-3-2。

5、通過上面得知如果余數(shù)是3,就會在身份證的第18位數(shù)字上出現(xiàn)的是9。如果對應(yīng)的數(shù)字是2,身份證的最后一位號碼就是羅馬數(shù)字x。

例如:某男性的身份證號碼為【53010219200508011x】, 我們看看這個身份證是不是合法的身份證。
首先我們得出前17位的乘積和【(57)+(39)+(010)+(15)+(08)+(24)+(12)+(91)+(26)+(03)+(07)+(59)+(010)+(85)+(08)+(14)+(1*2)】是189,然后用189除以11得出的結(jié)果是189/11=17----2,也就是說其余數(shù)是2。最后通過對應(yīng)規(guī)則就可以知道余數(shù)2對應(yīng)的檢驗碼是X。所以,可以判定這是一個正確的身份證號碼。

以上部分內(nèi)容來自百度百科

三、JAVA 校驗身份證號碼

package cn.wje.internationa;

import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
import java.util.regex.Pattern;

/**
 * @author QiFeng·Luo
 */
public class IdCardUtil {

    /**
     * 數(shù)字
     */
    public final static Pattern NUMBERS = Pattern.compile("\\d+");

    /**
     * 中國公民身份證號碼最小長度。
     */
    private static final int CHINA_ID_MIN_LENGTH = 15;

    /**
     * 中國公民身份證號碼最大長度。
     */
    private static final int CHINA_ID_MAX_LENGTH = 18;

    public static Exception isValidatedAllIdcard(String idcard) throws Exception {
        boolean ret = isIdcard(idcard);
        if (!ret) {
            throw new Exception("身份證格式有誤");
        }
        return null;
    }

    final static Map<Integer, String> zoneNum = new HashMap<>();
    /**
     * 身份證省份編碼
     * */
    static {
        zoneNum.put(11, "北京");
        zoneNum.put(12, "天津");
        zoneNum.put(13, "河北");
        zoneNum.put(14, "山西");
        zoneNum.put(15, "內(nèi)蒙古");
        zoneNum.put(21, "遼寧");
        zoneNum.put(22, "吉林");
        zoneNum.put(23, "黑龍江");
        zoneNum.put(31, "上海");
        zoneNum.put(32, "江蘇");
        zoneNum.put(33, "浙江");
        zoneNum.put(34, "安徽");
        zoneNum.put(35, "福建");
        zoneNum.put(36, "江西");
        zoneNum.put(37, "山東");
        zoneNum.put(41, "河南");
        zoneNum.put(42, "湖北");
        zoneNum.put(43, "湖南");
        zoneNum.put(44, "廣東");
        zoneNum.put(45, "廣西");
        zoneNum.put(46, "海南");
        zoneNum.put(50, "重慶");
        zoneNum.put(51, "四川");
        zoneNum.put(52, "貴州");
        zoneNum.put(53, "云南");
        zoneNum.put(54, "西藏");
        zoneNum.put(61, "陜西");
        zoneNum.put(62, "甘肅");
        zoneNum.put(63, "青海");
        zoneNum.put(64, "寧夏");
        zoneNum.put(65, "新疆");
        zoneNum.put(71, "臺灣");
        zoneNum.put(81, "香港");
        zoneNum.put(82, "澳門");
        zoneNum.put(91, "國外");
    }

    /**
     * 校驗碼
     */
    final static int[] PARITYBIT = { '1', '0', 'X', '9', '8', '7', '6', '5', '4', '3', '2' };

    /**
     * 加權(quán)因子wi
     */
    final static int[] POWER_LIST = { 7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, 5, 8, 4, 2 };

    /**
     * 驗證身份證號有效性
     *
     * @param idCard:身份證號
     * @return true/false
     */
    public static boolean isIdcard(String idCard) {
        // 號碼長度應(yīng)為15位或18位
        if (idCard == null || (idCard.length() != 15 && idCard.length() != 18)) {
            return false;
        }
        // 校驗區(qū)位碼
        if (!zoneNum.containsKey(Integer.valueOf(idCard.substring(0, 2)))) {
            return false;
        }
        // 校驗?zāi)攴?
        String year = idCard.length() == 15 ? "19" + idCard.substring(6, 8) : idCard.substring(6, 10);
        final int iyear = Integer.parseInt(year);
        if (iyear < 1900 || iyear > Calendar.getInstance().get(Calendar.YEAR)) {
            // 1900年的PASS,超過今年的PASS
            return false;
        }
        // 校驗月份
        String month = idCard.length() == 15 ? idCard.substring(8, 10) : idCard.substring(10, 12);
        final int imonth = Integer.parseInt(month);
        if (imonth < 1 || imonth > 12) {
            return false;
        }
        // 校驗天數(shù)
        String day = idCard.length() == 15 ? idCard.substring(10, 12) : idCard.substring(12, 14);
        final int iday = Integer.parseInt(day);
        if (iday < 1 || iday > 31) {
            return false;
        }
        // 校驗一個合法的年月日
        if (!isValidDate(year + month + day)) {
            return false;
        }
        // 校驗位數(shù)
        int power = 0;
        final char[] cs = idCard.toUpperCase().toCharArray();
        for (int i = 0; i < cs.length; i++) {// 循環(huán)比正則表達式更快
            if (i == cs.length - 1 && cs[i] == 'X') {
                break;// 最后一位可以是X或者x
            }
            if (cs[i] < '0' || cs[i] > '9') {
                return false;
            }
            if (i < cs.length - 1) {
                power += (cs[i] - '0') * POWER_LIST[i];
            }
        }
        // 校驗“校驗碼”
        if (idCard.length() == 15) {
            return true;
        }
        return cs[cs.length - 1] == PARITYBIT[power % 11];
    }

    /**
     * 判斷字符串是否為日期格式(合法)
     *
     * @param inDate:字符串時間
     * @return true/false
     */
    public static boolean isValidDate(String inDate) {
        if (inDate == null) {
            return false;
        }
        // 或yyyy-MM-dd
        SimpleDateFormat dataFormat = new SimpleDateFormat("yyyyMMdd");
        if (inDate.trim().length() != dataFormat.toPattern().length()) {
            return false;
        }
        // 該方法用于設(shè)置Calendar嚴格解析字符串;默認為true,寬松解析
        dataFormat.setLenient(false);
        try {
            dataFormat.parse(inDate.trim());
        } catch (ParseException e) {
            return false;
        }
        return true;
    }

    /**
     * 轉(zhuǎn)換成日期
     * @param birthday
     * @return
     */
    private static Date toBirthDay(String birthday){
        try{
            Calendar calendar = Calendar.getInstance();
            calendar.set(Calendar.YEAR, Integer.parseInt(birthday.substring(0, 4)));
            // 月份從0開始,所以減1
            calendar.set(Calendar.MONTH, Integer.parseInt(birthday.substring(4, 6)) - 1);
            calendar.set(Calendar.DAY_OF_MONTH, Integer.parseInt(birthday.substring(6, 8)));
            // 以下設(shè)置時分秒,但是對生日的意義不大
            calendar.set(Calendar.HOUR_OF_DAY, 0);
            calendar.set(Calendar.MINUTE, 0);
            calendar.set(Calendar.SECOND, 0);
            calendar.set(Calendar.MILLISECOND, 0);

            return calendar.getTime();
        }catch (Exception e){
            return null;
        }
    }

    /**
     * 給定內(nèi)容是否匹配正則
     *
     * @param pattern 模式
     * @param content 內(nèi)容
     * @return 正則為null或者""則不檢查,返回true,內(nèi)容為null返回false
     */
    private static boolean isMatch(Pattern pattern, CharSequence content) {
        if (content == null || pattern == null) {
            // 提供null的字符串為不匹配
            return false;
        }
        return pattern.matcher(content).matches();
    }

    /**
     * 將字符串轉(zhuǎn)換成指定格式的日期
     *
     * @param str        日期字符串.
     * @param dateFormat 日期格式. 如果為空,默認為:yyyy-MM-dd HH:mm:ss.
     * @return
     */
    private static Date strToDate(final String str, String dateFormat) {
        if (str == null || str.trim().length() == 0) {
            return null;
        }
        try {
            if (dateFormat == null || dateFormat.length() == 0) {
                dateFormat = "yyyy-MM-dd HH:mm:ss";
            }
            DateFormat fmt = new SimpleDateFormat(dateFormat);
            return fmt.parse(str.trim());
        } catch (Exception ex) {
            return null;
        }
    }

    /**
     * 根據(jù)日期獲取年
     *
     * @param date 日期
     * @return 年的部分
     */
    public static int year(Date date) {
        Calendar ca = Calendar.getInstance();
        ca.setTime(date);
        return ca.get(Calendar.YEAR);
    }

    /**
     * 將power和值與11取模獲得余數(shù)進行校驗碼判斷
     *
     * @param iSum 加權(quán)和
     * @return 校驗位
     */
    private static char getCheckCode18(int iSum) {
        switch (iSum % 11) {
            case 10:
                return '2';
            case 9:
                return '3';
            case 8:
                return '4';
            case 7:
                return '5';
            case 6:
                return '6';
            case 5:
                return '7';
            case 4:
                return '8';
            case 3:
                return '9';
            case 2:
                return 'x';
            case 1:
                return '0';
            case 0:
                return '1';
            default:
                return ' ';
        }
    }

    /**
     * 獲得18位身份證校驗碼
     * 計算方式:
     * 將前面的身份證號碼17位數(shù)分別乘以不同的系數(shù)。從第一位到第十七位的系數(shù)分別為:7 9 10 5 8 4 2 1 6 3 7 9 10 5 8 4 2
     * 將這17位數(shù)字和系數(shù)相乘的結(jié)果相加
     * 用加出來和除以11,看余數(shù)是多少
     * 余數(shù)只可能有0 1 2 3 4 5 6 7 8 9 10這11個數(shù)字。其分別對應(yīng)的最后一位身份證的號碼為1 0 X 9 8 7 6 5 4 3 2
     * 通過上面得知如果余數(shù)是2,就會在身份證的第18位數(shù)字上出現(xiàn)羅馬數(shù)字的Ⅹ。如果余數(shù)是10,身份證的最后一位號碼就是2
     * @param code17 18位身份證號中的前17位
     * @return 第18位
     */
    private static char getCheckCode18(String code17) {
        int sum = getPowerSum(code17.toCharArray());
        return getCheckCode18(sum);
    }

    /**
     * 將身份證的每位和對應(yīng)位的加權(quán)因子相乘之后,再得到和值
     *
     * @param iArr 身份證號碼的數(shù)組
     * @return 身份證編碼
     */
    private static int getPowerSum(char[] iArr) {
        int iSum = 0;
        if (POWER_LIST.length == iArr.length) {
            for (int i = 0; i < iArr.length; i++) {
                iSum += Integer.valueOf(String.valueOf(iArr[i])) * POWER_LIST[i];
            }
        }
        return iSum;
    }

    /**
     * 將15位身份證號碼轉(zhuǎn)換為18位
     *
     * @param idCard 15位身份編碼
     * @return 18位身份編碼
     */
    public static String convertIdCard(String idCard) {
        StringBuilder idCard18;
        if (idCard.length() != CHINA_ID_MIN_LENGTH) {
            return null;
        }
        if (isMatch(NUMBERS, idCard)) {
            // 獲取出生年月日
            String birthday = idCard.substring(6, 12);
            Date birthDate = strToDate(birthday, "yyMMdd");
            // 獲取出生年
            int sYear = year(birthDate);
            // 理論上2000年之后不存在15位身份證,可以不要此判斷
            if (sYear > 2000) {
                sYear -= 100;
            }
            idCard18 = new StringBuilder().append(idCard, 0, 6).append(sYear).append(idCard.substring(8));
            // 獲取校驗位
            char sVal = getCheckCode18(idCard18.toString());
            idCard18.append(sVal);
        } else {
            return null;
        }
        return idCard18.toString();
    }

    /**
     * 從身份證號碼中獲取生日
     * @param idno
     * @return null表示idno錯誤,未獲取到生日
     */
    public static Date getBirthDay(String idno){
        if(!isIdcard(idno)){
            return null;
        }
        if (idno.length() == 15) {
            // 如果是15位轉(zhuǎn)為18位
            idno = convertIdCard(idno);
        }
        return toBirthDay(idno.substring(6, 14));
    }

    /**
     * 從身份證號碼中獲取生日
     * @param idno
     * @return null表示idno錯誤,未獲取到生日 日期格式為:yyyy-MM-dd
     */
    public static String getBirthDayStr(String idno){
        if(!isIdcard(idno)){
            return null;
        }
        if (idno.length() == 15) {
            // 如果是15位轉(zhuǎn)為18位
            idno = convertIdCard(idno);
        }
        Date birthday = toBirthDay(idno.substring(6, 14));
        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
        return simpleDateFormat.format(birthday);
    }
    /**
     * 從身份證號中獲取性別
     * @param idno
     * @return 0:男,1:女,-1:證件號碼錯誤
     */
    public static String getGender(String idno){
        if(!isIdcard(idno)){
            return "-1";
        }
        if (idno.length() == 15) {
            // 如果是15位轉(zhuǎn)為18位
            idno = convertIdCard(idno);
        }
        // 奇男,偶女
        return (Integer.parseInt(idno.substring(16, 17)) % 2) == 0 ? "1" : "0";
    }

    /**
     * 方法調(diào)用測試
     * */
    public static void main(String[] args) {
        String idc= "130503670401001";
        //檢查身份證是否合規(guī)
        boolean idcard = isIdcard(idc);
        if (idcard) {
            System.out.println("身份證號碼合規(guī)");
            // 獲取身份證號碼中的生日
            Date birthDay = getBirthDay(idc);
            System.out.println("當前身份證的生日為:"+ getBirthDayStr(idc));
            // 獲取性別
            String gender = getGender(idc);
            if ("0".equals(gender)) {
                System.out.println("當前身份證的性別為:男性");
            } else if ("1".equals(gender)) {
                System.out.println("當前身份證的性別為:女性");
            } else {
                System.out.println("當前身份證格式不正確");
            }
        }else {
            System.out.println("身份證格式有誤");
        }
    }
}

說明:以上工具中 main 方法是用于測試的,如果放入項目中,不能使用 main 方法測試,可以使用@Test 注解測試。此處用 main 方法,只是為了方便貼代碼。

結(jié)果:

怎么用JAVA驗證身份證號碼有效性

補充:java開發(fā)身份證號校驗(邊輸入邊校驗)

公司最近有個需求,就是邊輸入邊校驗身份證號碼是否合規(guī)。以往的校驗都是輸完夠18位就校驗,做起來簡單的很,頭一次聽說要求這樣搞的,搞了我一下午。

#代碼利用多個正則表達式去校驗字符

#判斷年月日校驗

#大小月校驗

#閏年閏月的校驗

####以下就是代碼部分

    /**
     * 功能:身份證的有效驗證
     * @param idStr 身份證號
     * @return true 有效:false 無效
     */
    public static boolean idCardValidate(String idStr) {

        try {
            int index = 1;
            //第一位不能為0
            if (idStr.length() >= index && idStr.indexOf("0") == 0) {
                return false;
            }
            //地區(qū)碼
            index++;
            if (idStr.length() >= index) {
                Hashtable h = GetAreaCode();
                if (h.get(idStr.substring(0, index)) == null) {
                    //errorInfo = "身份證地區(qū)編碼錯誤。";
                    return false;
                }
            }
            // 年份
            index = 6;
            //第一位只能是1和2
            if (!verify(idStr, index, "[1,2]")) {
                return false;
            }
            index++;
            //第二位跟隨第一位只有9或0
            if (!verify(idStr, index,idStr.length()>index && idStr.substring(6,7).equals("1")?"[9]":"[0]")) {
                return false;
            }
            index++;
            //第三位 千禧年后0-?,千禧年前0-9
            if (!verify(idStr, index,idStr.length()>index &&  idStr.substring(6,7).equals("1")?"[0-9]":"[0-2]")) {
                return false;
            }
            index++;
            //第三位 0-9
            if (!verify(idStr, index, "[0-9]")) {
                return false;
            }
            if (idStr.length() > index) {
            	//是否比當前年份大
                SimpleDateFormat ydf = new SimpleDateFormat("yyyy");
                if (ydf.parse(idStr.substring(6, 10)).getTime() > new Date().getTime()) {
                    return false;
                }
            }
            // 月份
            index++;
            //第一位只能是1和0
            if (!verify(idStr, index, "[0,1]")) {
                return false;
            }
            index++;
            //第二位跟隨第一位變化
            if (!verify(idStr, index, idStr.length()>index &&  idStr.substring(index-1,index).equals("1")?"[0-2]":"[1-9]")) {
                return false;
            }
            if (idStr.length() > index) {
            	//是否比當前月份大
                SimpleDateFormat ydf = new SimpleDateFormat("yyyyMM");
                if (ydf.parse(idStr.substring(6, 12)).getTime() > new Date().getTime() && verifyMonth(idStr.substring(10, 12))) {
                    return false;
                }
            }
            // ================ 日份 ================
            index++;
            //第一位 二月最多是2
            if (!verify(idStr, index,  idStr.length()>index &&  (dayMonth(idStr.substring(10, 12)) == 2)?"[0-2]":"[0-3]")) {
                return false;
            }
            index++;
            if (idStr.length()>index) {
                int ten = Integer.parseInt(idStr.substring(index-1, index));//上一位
                String filter = "[0-9]";
                switch (dayMonth(idStr.substring(10, 12))){
                    case 1://31天
                        if(ten == 3){
                            filter = "[0,1]";
                        }
                        break;
                    case 2://2月
                        if(ten == 2){
                            filter = "[0-8]";
                            int year = Integer.parseInt(idStr.substring(6, 10));
                            //閏年
                            if(year%400 == 0 || year%4==0){
                                filter = "[0-9]";
                            }
                        }
                        break;
                    case 3://30天
                        if(ten == 3){
                            filter = "[0]";
                        }
                        break;
                }
                if(ten == 0){
                    filter = "[1-9]";
                }
                if(!verifyIndex(idStr,index,filter)){
                    return false;
                }
            }
            if (idStr.length() > index) {
                SimpleDateFormat ydf = new SimpleDateFormat("yyyyMMdd");
            	//是否比當前日期大
                if (ydf.parse(idStr.substring(6, 14)).getTime() > new Date().getTime()) {
                    return false;
                }
            }
            // 號碼的長度
            String filter = "[0-9]{0,17}";
            boolean flag = idStr.matches(filter + (idStr.length() == 18 ? "[0-9,x,X]" : ""));
            if (!flag) {
                return false;
            }
        } catch (ParseException e) {
            e.printStackTrace();
            return false;
        }
        return true;
    }

	/**
	 *	驗證
     * @param text		文本
     * @param index		下標
     * @param filter	正則匹配
     * @return
     */
    private static boolean verify(String text, int index, String filter) {
    	//是否滿足長度
        if (text.length() > index) {
            return verifyIndex(text, index, filter);
        }
        return true;
    }

	/**
	 *	驗證
     * @param text		文本
     * @param index		下標
     * @param filter	正則匹配
     * @return
     */
    private static boolean verifyIndex(String text, int index, String filter) {
        String sub = text.substring(index, index + 1);
        return sub.matches(filter);
    }
	
    private static boolean verifyMonth(String month){
        return Integer.parseInt(month)>12;
    }

	/**
	 *	大小月、二月
     * @return
     */
    private static int dayMonth(String month){
        switch (Integer.parseInt(month)){
            case 4:
            case 6:
            case 9:
            case 11:
                return 3;
            case 2:return 2;
            default: return 1;
        }
    }

    /**
     * 功能:設(shè)置地區(qū)編碼
     * @return Hashtable 對象
     */
    private static Hashtable GetAreaCode() {
        Hashtable hashtable = new Hashtable();
        hashtable.put("11", "北京");
        hashtable.put("12", "天津");
        hashtable.put("13", "河北");
        hashtable.put("14", "山西");
        hashtable.put("15", "內(nèi)蒙古");
        hashtable.put("21", "遼寧");
        hashtable.put("22", "吉林");
        hashtable.put("23", "黑龍江");
        hashtable.put("31", "上海");
        hashtable.put("32", "江蘇");
        hashtable.put("33", "浙江");
        hashtable.put("34", "安徽");
        hashtable.put("35", "福建");
        hashtable.put("36", "江西");
        hashtable.put("37", "山東");
        hashtable.put("41", "河南");
        hashtable.put("42", "湖北");
        hashtable.put("43", "湖南");
        hashtable.put("44", "廣東");
        hashtable.put("45", "廣西");
        hashtable.put("46", "海南");
        hashtable.put("50", "重慶");
        hashtable.put("51", "四川");
        hashtable.put("52", "貴州");
        hashtable.put("53", "云南");
        hashtable.put("54", "西藏");
        hashtable.put("61", "陜西");
        hashtable.put("62", "甘肅");
        hashtable.put("63", "青海");
        hashtable.put("64", "寧夏");
        hashtable.put("65", "新疆");
        hashtable.put("71", "臺灣");
        hashtable.put("81", "香港");
        hashtable.put("82", "澳門");
        hashtable.put("91", "國外");
        return hashtable;
    }

關(guān)于“怎么用JAVA驗證身份證號碼有效性”這篇文章的內(nèi)容就介紹到這里,感謝各位的閱讀!相信大家對“怎么用JAVA驗證身份證號碼有效性”知識都有一定的了解,大家如果還想學(xué)習(xí)更多知識,歡迎關(guān)注創(chuàng)新互聯(lián)行業(yè)資訊頻道。

新聞名稱:怎么用JAVA驗證身份證號碼有效性
本文網(wǎng)址:http://chinadenli.net/article16/ihoddg.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供網(wǎng)站建設(shè)外貿(mào)網(wǎng)站建設(shè)靜態(tài)網(wǎng)站網(wǎng)站營銷品牌網(wǎng)站建設(shè)移動網(wǎng)站建設(shè)

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時需注明來源: 創(chuàng)新互聯(lián)

微信小程序開發(fā)