public class HelloWorld{
public static void main(String[] args) {
final char SEX = '男';
final int YEAR = "18";
System.out.println(SEX);
System.out.println(YEAR);
}
}
final int YEAR = "18";
其中YEAR是int型,不需要“”,改为final int YEAR = 18;就好了
final int YEAR = "18"; 声明的变量是整型的,但是后面的写的加双信号的字符串,把双信号去掉就可以了
= =好吧,只能定义性别的,换成性别的就好了= =