public void IDcard(String number){
String birth = number.substring(6, 14);
String sex = number.substring(16, 17);
if(Integer.parseInt(sex)%2==0){
sex = "女";
}else{
sex ="男";
}
String birthday = birth.substring(0, 4)+"-"+birth.substring(4, 6)+"-"+birth.substring(6, 8);
System.err.println("生日:"+birthday+";性别"+sex);
}
传入参数为身份证号码