int age=25;
if (age>60){
System.out.println("老年");
}else if(age>40){
System.out.println("中年");
}else if(age>18){
System.out.println("少年");
}else if(age<18){
System.out.println("童年");
}
if (age>60){
System.out.println("老年");
}else if(age>40){
System.out.println("中年");
}else if(age>18){
System.out.println("少年");
}else if(age<18){
System.out.println("童年");
}
2015-06-27