In C and C++, a character literal may contain representations of more than 
one character, but the value of such a character literal is implementation-defined. 
In the Java programming language, a character literal always represents exactly 
one character. 高手路过给个解释,谢谢

解决方案 »

  1.   

    也就是java的字符定义是跟平台无关的,C 和 c++是有关的。
      

  2.   

    In C and C++, a character literal may contain representations of more than 
    在C和C++中,一个character字面值可以由包含一个或一个以上的字符来表示(比如 char c = 'abc')
    one character, but the value of such a character literal is implementation-defined. 
    但是这样的character字面值是编译器相关的。
    In the Java programming language, a character literal always represents exactly 
    在Java编程语言中,一个character字面值总只用一个字符来表示(比如 char c = 'a'; char c = 'ab'//错误)
    one character.  
      

  3.   

    ls解释的好 刚刚知道原来c/c++中还可以这样