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

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定

為什么我的會(huì)報(bào)錯(cuò)

package com.test;


public class iphone {

public static void main(String[]args){

iphone hello=new iphone();

hello.screen=5.0f;

hello.cpu=5.5f;

hello.price=5200;

hello.yy();

hello.call();

}


}

package com.test;


public class miphone {

float screen;

float cpu;

int price;


void yy() {

System.out.println("發(fā)信息!");

}


void call() {

System.out.println("screen:" + screen + "cpu:" + cpu + "price:" + price);

}

}


正在回答

2 回答

	public?void?yy()?{
		System.out.println("發(fā)信息!");
	}

	public?void?call()?{
		System.out.println("screen:"?+?screen?+?"cpu:"?+?cpu?+?"price:"?+?price);
	}

我建議你把構(gòu)造方法放在main前面

0 回復(fù) 有任何疑惑可以回復(fù)我~
#1

干嘛好呢 提問(wèn)者

非常感謝!
2016-02-13 回復(fù) 有任何疑惑可以回復(fù)我~

public void yy() {

}

public void call() {

}

這么寫(xiě) 試試

0 回復(fù) 有任何疑惑可以回復(fù)我~

舉報(bào)

0/150
提交
取消
Java入門(mén)第二季 升級(jí)版
  • 參與學(xué)習(xí)       531220    人
  • 解答問(wèn)題       6327    個(gè)

課程升級(jí)!以終為始告別枯燥,在開(kāi)發(fā)和重構(gòu)中體會(huì)Java面向?qū)ο缶幊痰膴W妙

進(jìn)入課程

為什么我的會(huì)報(bào)錯(cuò)

我要回答 關(guān)注問(wèn)題
微信客服

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

幫助反饋 APP下載

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

公眾號(hào)

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