Topic: JAVA 中如何将字符转为ASCII?

  Print this page

1.JAVA 中如何将字符转为ASCII? Copy to clipboard
Posted by: jerry010
Posted on: 2004-10-14 23:02

如题

2.Re:JAVA 中如何将字符转为ASCII? [Re: jerry010] Copy to clipboard
Posted by: dorrenchen
Posted on: 2004-10-15 00:12


// cast char to int type
char myChar = 'a';
int code = myChar;

// or print directly
System.out.println((int)myChar);

3.Re:JAVA 中如何将字符转为ASCII? [Re: jerry010] Copy to clipboard
Posted by: q_yuan
Posted on: 2004-10-15 10:49

用强制转化啊!


   Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent
Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1
客服电话 18559299278    客服信箱 714923@qq.com    客服QQ 714923