源自:4-3 Java条件语句之多重 if
找不出错误 求大神帮忙解决
public class HelloWorld {
public static void main(String[] args) {
int age=25;
if ( age > 60 )
{
System.out.println( "老年" );
}
else if( age > 40 )
{
System.out.println( "中年" );
}
else if( age > 18 )
{
System.out.println( "少年" );
}
else
{
System.out.println( "童年" );
}
}
}
提问者:qq_像风_4
2018-03-27 16:34