public class HelloWorld {
public static void main(String[] args) {
int age=25;
if (age>=18){
System.out.println("成年")
}else{
System.out.println("未成年")
}
}
}
慕勒6879185
浏览 894回答 1
1回答
frece
错误是因为你没写分号,并不是因为中文正确代码: public static void main(String[] args) {
int age=25;
if (age>=18){
System.out.println("成年");
}else{
System.out.println("未成年");
}
/**
* 输出结果:
* 成年
*/
}