The primitive types (¡ì4.2) are the boolean type and the numeric types. The numeric types are the integral types byte, short, int, long, and char, and the floating-point types float and double. 这是从SUN官方网站下载的《java language specification》上写的 不明白,难道char是数值型的类型吗?
type and the numeric types. The numeric types are the integral types byte, short,
int, long, and char, and the floating-point types float and double.
这是从SUN官方网站下载的《java language specification》上写的
不明白,难道char是数值型的类型吗?
char c='a';
char d='b';
System.out.println(c+d);
似乎我定义了两个字符类型
而实际是ascii码相加 =195
这个很拗口,和别的语言不一样
我希望打印出'ab'
看来用char是不行的了
这个char有什么实际意义吗