用字节符char,后加''不行吗? public class HelloWorld{ public static void main(String[] args) { final char MAN='男'; final char WOMAN='女'; System.out.println(MAN); System.out.println(WOMAN); }
char后跟的字符是单个字符,用单引号引起来