Arrays.asList 可以用在對象上,但基本類型就出錯了。byte b[]=new byte[3];b[0]=1;b[1]=2;b[2]=3;ArrayList<Byte>bytes=new ArrayList<Byte>();bytes.addAll(Arrays.asList(b));這個提示錯誤我想讓 byte[] 數組 轉換成 ArrayList ,這個可以實現么?還是需要先轉換成 Byte[] 數組 再轉換成 byte[] 才能實現呢?
基本類型數組如何轉ArrayList?
慕桂英3389331
2019-03-14 14:15:08