String[] birth = 生日.split("年"); Integer year = Calendar.getInstance().get(Calendar.YEAR);//得出年龄 Integer age = year-Integer.parseInt(birth[0]);