@Test public void testGetGenderByIdCard() throws Exception { }
public static String getGenderByIdCard(String idCard) { String sGender = "N"; if (idCard.length() == CHINA_ID_MIN_LENGTH) { idCard = conver15CardTo18(idCard); } String sCardNum = idCard.substring(16, 17); if (Integer.parseInt(sCardNum) % 2 != 0) { sGender = "M"; } else { sGender = "F"; } return sGender; }
IdCardKit { public static String getGenderByIdCard(String idCard) { String sGender = "N"; if (idCard.length() == CHINA_ID_MIN_LENGTH) { idCard = conver15CardTo18(idCard); } String sCardNum = idCard.substring(16, 17); if (Integer.parseInt(sCardNum) % 2 != 0) { sGender = "M"; } else { sGender = "F"; } return sGender; } }
IdCardKit { public static String getGenderByIdCard(String idCard) { String sGender = "N"; if (idCard.length() == CHINA_ID_MIN_LENGTH) { idCard = conver15CardTo18(idCard); } String sCardNum = idCard.substring(16, 17); if (Integer.parseInt(sCardNum) % 2 != 0) { sGender = "M"; } else { sGender = "F"; } return sGender; }  }
IdCardKit { public static String getGenderByIdCard(String idCard) { String sGender = "N"; if (idCard.length() == CHINA_ID_MIN_LENGTH) { idCard = conver15CardTo18(idCard); } String sCardNum = idCard.substring(16, 17); if (Integer.parseInt(sCardNum) % 2 != 0) { sGender = "M"; } else { sGender = "F"; } return sGender; }  static String conver15CardTo18(String idCard); static boolean validateCard(String idCard); static boolean validateIdCard18(String idCard); static boolean validateIdCard15(String idCard); static String[] validateIdCard10(String idCard); static boolean validateTWCard(String idCard); static boolean validateHKCard(String idCard); static int[] converCharToInt(char[] ca); static int getPowerSum(int[] iArr); static String getCheckCode18(int iSum); static int getAgeByIdCard(String idCard); static String getBirthByIdCard(String idCard); static Short getYearByIdCard(String idCard); static Short getMonthByIdCard(String idCard); static Short getDateByIdCard(String idCard); static String getGenderByIdCard(String idCard); static String getProvinceByIdCard(String idCard); }
IdCardKit { public static String getGenderByIdCard(String idCard) { String sGender = "N"; if (idCard.length() == CHINA_ID_MIN_LENGTH) { idCard = conver15CardTo18(idCard); } String sCardNum = idCard.substring(16, 17); if (Integer.parseInt(sCardNum) % 2 != 0) { sGender = "M"; } else { sGender = "F"; } return sGender; }  static String conver15CardTo18(String idCard); static boolean validateCard(String idCard); static boolean validateIdCard18(String idCard); static boolean validateIdCard15(String idCard); static String[] validateIdCard10(String idCard); static boolean validateTWCard(String idCard); static boolean validateHKCard(String idCard); static int[] converCharToInt(char[] ca); static int getPowerSum(int[] iArr); static String getCheckCode18(int iSum); static int getAgeByIdCard(String idCard); static String getBirthByIdCard(String idCard); static Short getYearByIdCard(String idCard); static Short getMonthByIdCard(String idCard); static Short getDateByIdCard(String idCard); static String getGenderByIdCard(String idCard); static String getProvinceByIdCard(String idCard); static final int CHINA_ID_MIN_LENGTH; static final int CHINA_ID_MAX_LENGTH; static final String cityCode; static final int power; static final String verifyCode; static final int MIN; static final Map<String, String> cityCodes; static final Map<String, Integer> twFirstCode; static final Map<String, Integer> hkFirstCode; }