public class HelloWorld{
public static void main(String[] args) {
final String LI="boy";
final String DI="girl";
System.out.println (boy);
System.out.println (girl);
}
}
输出的时候应该用变量名,LI和DI
public class HelloWorld{
public static void main(String[] args) {
final String LI="boy";
final String DI="girl";
System.out.println (LI);
System.out.println (DL);
}
}
输出错了,输出的是变量名System.out.println (LI);这样
然后这题很奇怪他一定要求要输出汉字的男女所以应该这样敲
final char LI='男';
System.out.println (LI);