类 IdentificationCard

    • 方法详细资料

      • length15

        public boolean length15()
        15位身份证
        返回:
      • length18

        public boolean length18()
        18位身份证
        返回:
      • isValid

        public static boolean isValid​(String card)
        验证身份证号有效
        参数:
        card -
        返回:
      • getAge

        public int getAge()
        获得年龄
        返回:
      • computeLastCode

        public static char computeLastCode​(String front17Chars)
        计算身份证最后一位校验码
        参数:
        front17Chars - 前17位数字字符串
        返回:
        校验码