为什么定义性别常量必须用string啊,char不可以吗
public class HelloWorld{
public static void main(String[] args) {
final char MALE='男';
final char FEMALE='女';
System.out.println(MALE);
System.out.printlm(FEMALE);
}
}
public class HelloWorld{
public static void main(String[] args) {
final char MALE='男';
final char FEMALE='女';
System.out.println(MALE);
System.out.printlm(FEMALE);
}
}
2015-05-25
举报