获取字符的unicode值 [英] Get unicode value of character
本文介绍了获取字符的unicode值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有什么方法可以获取字符的键码吗?例如
Is there any way to get the keycode of a char? For example
getKeycode('C');
有没有类似的东西?
谢谢
推荐答案
char ch='c';
int code = ch;
System.out.println(code);
输出:
99
只是为了转义char \
,您必须像char ch ='\\';
just for escape char \
you have to use like char ch='\\';
这篇关于获取字符的unicode值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文