瀏覽單個文章
stalin
Major Member
 

加入日期: Sep 2002
文章: 155
雖然我不是專業的
debug還可以啦
byte[] data = null;
data[j / 2] = (byte) ((Character.digit(input.charAt(j), 16) << 4)
+ Character.digit(input.charAt(j+1), 16));

陣列不能這樣寫啦,你要先給他new 個instance
如byte[] = new byte[10]
才能用data[j/2]
不然data[]是空的,data[j/2]當然會null exception
舊 2014-06-23, 01:11 AM #23
回應時引用此文章
stalin離線中