当前位置: 技术问答>java相关
JAVA如何将一个字母变成他的ASCII值啊?
来源: 互联网 发布时间:2015-02-03
本文导语: | byte[] originalBytes = rs.getBytes("RAWDATA"); String originalString = new String(originalBytes, "ASCII"); | Character c = new Character('A'); int ascii = c.hashCode(); 得到65
|
byte[] originalBytes = rs.getBytes("RAWDATA");
String originalString =
new String(originalBytes, "ASCII");
String originalString =
new String(originalBytes, "ASCII");
|
Character c = new Character('A');
int ascii = c.hashCode();
得到65
int ascii = c.hashCode();
得到65