题目:编写一个应用程序,给出汉字“你”“我”“他”在Unicode表中的位置。
package com.company;
public class Hello {
public static void main(String[] args) {
char ch1 = '你',ch2 = '我',ch3 = '他';
System.out.println(ch1+"字符在Unicode表中的位置为"+(int)ch1);
System.out.println(ch2+"字符在Unicode表中的位置为"+(int)ch2);
System.out.println(ch3+"字符在Unicode表中的位置为"+(int)ch3);
}
}
代码运行截图: