第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機立即綁定

幫忙看一下代碼的錯誤,謝謝

public class Coner1 {

public static byte[]int2bytes(int id){

byte[] arr=new byte[4];//創(chuàng)建一個數(shù)組,長度為四

arr[0]=(byte)((int)id>>0*8 && 0xff);//0xff報錯Oxff cannot be resolved to a variable

arr[1]=(byte)((int)id>>1*8 && 0xff);

arr[2]=(byte)((int)id>>2*8 && 0xff);

arr[3]=(byte)((int)id>>3*8 && 0xff);

return arr;?

}

public static void main(String[] args) {

byte[]arr=Coner1.int2bytes(8143);

System.out.println(arr[0]+","arr[1]+","arr[2]+","arr[3]);//arr報錯

}

}



正在回答

2 回答

public class Coner1 {

public static byte[]int2bytes(int id){

byte[] arr=new byte[4];//創(chuàng)建一個數(shù)組,長度為四

arr[0]=(byte)((int)id>>0*8 & 0xff);//0xff報錯Oxff cannot be resolved to a variable

arr[1]=(byte)((int)id>>1*8 & 0xff);

arr[2]=(byte)((int)id>>2*8 & 0xff);

arr[3]=(byte)((int)id>>3*8 & 0xff);

return arr;?

}

public static void main(String[] args) {

byte[]arr=Coner1.int2bytes(8143);

System.out.println(arr[0]+","+arr[1]+","+arr[2]+","+arr[3]);//arr報錯

}

}


0 回復 有任何疑惑可以回復我~
#1

愛行走的大樹 提問者

非常感謝!
2016-06-18 回復 有任何疑惑可以回復我~

不知道

0 回復 有任何疑惑可以回復我~

舉報

0/150
提交
取消
二進制基礎
  • 參與學習       99831    人
  • 解答問題       211    個

二進制是計算機唯一能識別的語言,是學習計算機技術必備的知識

進入課程

幫忙看一下代碼的錯誤,謝謝

我要回答 關注問題
微信客服

購課補貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網(wǎng)微信公眾號