字符变量charVar的值是“我”字。程序中输出了该字符的Unicode值以及Unicode值对应的十进制数值,并打印输出了charVar与一个int型变量做加法运算后的值
public class Test {
public static void main(String[] args) {
int intResult,intVar=10;
char charVar='我';
intResult=intVar+charVar;
System.out.println("The char is:"+charVar);
System.out.println("The char`s Unicode is:\\u"+Integer.toHexString(charVar));
System.out.println("The int value corresponding to the char is:"+
new Integer(charVar).toString());
System.out.println("Int "+intVar+" add the char,the result is: "+intResult);
}
}



















![2023年中国数据库一体机行业现状分析:随着IT发展,需求量增加[图]](https://img-blog.csdnimg.cn/img_convert/bd90f2660f1721ef6fe7671b74df27d6.png)
