>>178
>>379
1977/10/10みたいな感じで入力すれば年齢が出る。

public class Test
{

 public static void main(String[] args) throws IOException, ParseException
 {
  Date nowdate = new Date(System.currentTimeMillis());
  BufferedReader br = new BufferedReader
        (new InputStreamReader(System.in));
  System.out.println("生年月日入れて(yyyymd)");
  
  String str = br.readLine();
  DateFormat df = DateFormat.getDateInstance();
  Date borndate = df.parse(str);
  int year = nowdate.getYear() - borndate.getYear();
  if((nowdate.getMonth() < borndate.getMonth()) ||
  (nowdate.getMonth() == borndate.getMonth() && nowdate.getDate() < borndate.getDate()))
  {
   year -= 1;
  }
  System.out.println(Integer.toString(year) + "歳です");
  
  
 }
}