public class HelloWorld{ public static void main(String[] args) { final char BOY="男"; final char GIRL="女"; System.out.println(BOY); System.out.println(GIRL); } }
char用单引号
char 单个字符
public class HelloWorld{
public static void main(String[] args) {
final char Male='男';
final char Female='女';
System.out.println(Male);
System.out.println(Female);
}
}
注意引号的变化