错的啊 输入大于18的都是成年啊
public class HelloWorld {
public static void main(String[] args) {
int age=25;
if (age>18) {
System.out.println("成年");}
else if (age>40) {
System.out.println("中年");}
else if(age>60){
System.out.println("老年");}
else {
System.out.println("童年");}
}
}