public class DataTypeChangeHelper { /** * 将一个单字节的byte转换成32位的int * * @param b * byte * @return convert result */ public static int unsignedByteToInt(byte b) { return (int) b & 0xFF; } /** * 将一个单字节的Byte转换成十六进制的数 * * @param b * byte * @return convert re
转载自:http://qing.blog.sina.com.cn/1820422183/6c81702733001qvk.html 1.c版 int hexcharToInt(char c) { if (c >= '0' && c <= '9') return (c - '0'); if (c >= 'A' && c <= 'F') return (c - 'A' + 10); if (c >=
public static void main(String[] args){ //创建一个int数组,长度为100, int n = 100; int[] arrayInt = new int[n]; Random random = new Random(); ArrayList myList = new ArrayList(); while(myList.size() < 100){ //随机函数生成0-100的整数 int num = random.nextInt(101); //myLi