摘要:有时候编写color 相关 的程序时,需要将十六进制字符串转换成int。方法如下:Stringstr="0xC0A80010";Integerss=0xC0A80010;LonglongStr=Long.parseLong(str.substring(2),16);ss=newInteger(longStr.intValue());System.out.println(ss);System.out.println(Integer.toHexString(ss));-1062731760c0a80010
阅读全文
posted @ 2013-05-26 04:10
浙公网安备 33010602011771号