面试题:
请使用两种方式求单个字符 '刘' 的Unicode码
思路:
char a = '刘';
a + 1 - 1
答案
@Test
public void test() {
char j = '贾';
char s = '世';
char h = '豪';
System.out.println(j + 1 - 1);
System.out.println(s + 1 - 1);
System.out.println(h + 1 - 1);
System.out.println(j + s + h + 1 - 1);
}
面试题Unicode码
最新推荐文章于 2022-07-09 12:47:39 发布