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

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

老師給我看看!我做完了怎么不顯示結(jié)果?。≈x謝!

我做完了怎么不顯示結(jié)果啊
package com.imooc;

public class Imooc {
????? //屬性(成員變量)
??????? float screen;
?????????? float cpu;
?????????? float mem;
????? //方法
?????????? void call(){
??????? ??? System.out.println(123456);
?????????? }
?????????? void tcall(){
??????? ??? System.out.println("screen:"+screen+"cpu:"+cpu+"mem"+mem);
?????????? }
??????????
}
package com.imooc;

public class ABC {
????????? public static void mian(String[]args){
??????? ?? Imooc qwe=new Imooc();
??????? ?? qwe.tcall();
????????? }
}

正在回答

3 回答

同一個(gè)項(xiàng)目下創(chuàng)建兩個(gè)類 放在eclipse里面沒有問題 可以顯示!

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

public class Imooc?

{

? ? ? //屬性(成員變量)

? ? ? ? ? ?float screen;

? ? ? ? ? ?float cpu;

? ? ? ? ? ?float mem;

? ? ? //方法 ?第一種:

? ? ? ? ? ?public void call()

? ? ? ? ? ?{

? ? ? ? ? ? System.out.println("123456");

? ? ? ? ? ?}

? ? ? ? ? ?public void tcall(double newScreen,double newCpu,double newMem)

? ? ? ? ? ?{

? ? ? ? ? ? System.out.println("screen:"+newScreen+"cpu:"+newCpu+"mem"+newMem);

? ? ? ? ? ?} ??

??

? ? ? ? ? ?public static void main(String[]args)

? ? ? ? ? ?{

? ? ? ? ? ? ?Imooc qwe=new Imooc();

? ? ? ? ? ? ? qwe.tcall(4.0,5.0,6.0);

? ? ? ? ? ?}

? ? ? ? ? ?/*第二種:使用內(nèi)部類,將方法定義在類中

? ? ? ? ? ? * public class inter

? ? ? ? ? ?{

? ? ? ? ? public void call()

? ? ? ? ? ? ? ?{

? ? ? ? ? ? ? ? System.out.println("123456");

? ? ? ? ? ? ? ?}

? ? ? ? ? ? ? ?public void tcall(double newScreen,double newCpu,double newMem)

? ? ? ? ? ? ? ?{

? ? ? ? ? ? ? ? System.out.println("screen:"+newScreen+"cpu:"+newCpu+"mem"+newMem);

? ? ? ? ? ? ? ?}

? ?

? ? ? ? ? ?}

? ? ? ? ? ?public static void main(String[]args)

? ? ? ? ? ?{

? ? ? ? ? ? ?Imooc qwe=new Imooc();

? ? ? ? ? ? ?inter inn=qwe.new inter();

? ? ? ? ? ? ?inter.tcall(4.0,5.0,6.0);

? ? ? ? ? ?}

? ? ? ? ? ?*/ ? ? ? ? ?

}



? ??


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

public static void mian(String[]args)

?main 寫錯(cuò)了

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

舉報(bào)

0/150
提交
取消

老師給我看看!我做完了怎么不顯示結(jié)果??!謝謝!

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

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

幫助反饋 APP下載

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

公眾號(hào)

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