请问这个代码为什么用char就不行,改用String就成功了呢?
public class HelloWorld{
public static void main(String[] args) {
final char SEX1='男';
final char SEX2='女';
System.out.println(SEX1);
System.out.println(SEX2);
}
}
public class HelloWorld{
public static void main(String[] args) {
final char SEX1='男';
final char SEX2='女';
System.out.println(SEX1);
System.out.println(SEX2);
}
}
2017-02-28
举报