public class HelloWorld{
public static void main(String[] args) {
final char SEX1="男";
final char SEX2="女";
System.out.println(SEX1,SEX2);
}
}
赋值变量的时候错了,char是跟单引号,String跟双引号,如下:
final char sex1='男';
final String sex1="男";
这样写
System.out.println(SEX1);
Systrm.out.println(SEX2);
final String SEX1="男";
final String SEX2="女";
System.out.println(SEX1 + SEX2);