char mac= new char[2];
mac[0] = 'A';
mac[1] = 8;
char pp;
我想把两个char A和8转成16进制 0xA8放到pp这个char里面去? 怎么做
------解决思路----------------------
char[] mac= new char[2];
mac[0] = 'A';
mac[1] = '8';
char pp;
int b = Integer.valueOf(new String(mac), 16);
pp = (char)b;
System.out.println((int)pp);