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

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問(wèn)題,去搜搜看,總會(huì)有你想問(wèn)的

為什么我的程序無(wú)法運(yùn)行

為什么我的程序無(wú)法運(yùn)行

慕無(wú)忌5541117 2017-07-06 15:16:11
public?class?HelloWorld?{ ????public?static?void?main(String[]?args)?{ ???????? //?創(chuàng)建對(duì)象,對(duì)象名為hello HelloWorld?hello?=?new?HelloWorld(); ????????//?調(diào)用方法,傳入兩門課程的成績(jī) hello.calcAvg(94,?81); } /* ?*?功能:計(jì)算兩門課程考試成績(jī)的平均分并輸出平均分 ?*?定義一個(gè)包含兩個(gè)參數(shù)的方法,用來(lái)傳入兩門課程的成績(jī) ?*/ ?????public?void?clacAvg(int?a,int?b){ ?????????double?avg?=?(a+b)/2.0; ?????????System.out.println("平均分:"?+?avg); ?????}提示端口不存在,無(wú)法運(yùn)行
查看完整描述

3 回答

已采納
?
amorlova

TA貢獻(xiàn)58條經(jīng)驗(yàn) 獲得超16個(gè)贊

端口占用,最簡(jiǎn)單的辦法就是重啟電腦

查看完整回答
反對(duì) 回復(fù) 2017-07-06
?
王曉明哇

TA貢獻(xiàn)4條經(jīng)驗(yàn) 獲得超2個(gè)贊

你的函數(shù)名,你的}

查看完整回答
反對(duì) 回復(fù) 2017-07-07
?
望遠(yuǎn)

TA貢獻(xiàn)1017條經(jīng)驗(yàn) 獲得超1032個(gè)贊

public?class?HelloWorld?{
????public?static?void?main(String[]?args)?{
?????????
????????//?創(chuàng)建對(duì)象,對(duì)象名為hello
????????HelloWorld?hello?=?new?HelloWorld();
?????????
????????//?調(diào)用方法,傳入兩門課程的成績(jī)
????????hello.calcAvg(94,?81);
????}
?
????/*
?????*?功能:計(jì)算兩門課程考試成績(jī)的平均分并輸出平均分
?????*?定義一個(gè)包含兩個(gè)參數(shù)的方法,用來(lái)傳入兩門課程的成績(jī)
?????*/
?????public?void?clacAvg(int?a,int?b){//注意,這里的方法名和你調(diào)用的不一致,打錯(cuò)了吧。改成calcAvg
?????????double?avg?=?(a+b)/2.0;
?????????System.out.println("平均分:"?+?avg);
?????}
}//少了個(gè)}


查看完整回答
反對(duì) 回復(fù) 2017-07-07
?
D許咚

TA貢獻(xiàn)7條經(jīng)驗(yàn) 獲得超2個(gè)贊

public?class?Test1?{

	/**
	?*?@param?args
	?*/
	public?static?void?main(String[]?args)?{
		//?TODO?Auto-generated?method?stub
		Test1?t=new?Test1();
		t.anverage(100,120);
	}
	public?void?anverage(int?a,int?b){
		double?result=(a+b)/2.0;
		System.out.println("平均分:"+result);
	}

}

我的能運(yùn)行啊

查看完整回答
反對(duì) 回復(fù) 2017-07-06
  • 3 回答
  • 0 關(guān)注
  • 1971 瀏覽
慕課專欄
更多

添加回答

舉報(bào)

0/150
提交
取消
微信客服

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

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)