i = Integer.parseInt(a.substring(2, a.length()), 16); System.out.printf("0x%X", i); 这样就可以了,输出i为0xE8
© 著作权归作者所有