亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
public class HelloWorld {
    public static void main(String[] args) {
        
		// 定義int類型變量,值為86
		int score1 = 86; 
        
		// 創建Integer包裝類對象,表示變量score1的值
		Integer score2=new Integer(score1);
        
		// 將Integer包裝類轉換為double類型
		double score3=score2.doubleValue();
        
		// 將Integer包裝類轉換為float類型
		float score4=score2.floatValue();
        
		// 將Integer包裝類轉換為int類型
		int score5 =score2.intValue();

		System.out.println("Integer包裝類:" + score2);
		System.out.println("double類型:" + score3);
		System.out.println("float類型:" + score4);
		System.out.println("int類型:" + score5);
	}
}


正在回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號