調用方法時出錯。求各位大佬指教
package com.imooc;
public class Telephone {
float screen;
float cpu;
void call(){
?? ?System.out.println("這是電話功能");
}
void message(){
?? ?System.out.println("This is the function of sending message!");
}
}
package com.imooc;
public class InitialTelephone {
Telephone phone=new Telephone();
phone.message();
}
? 在這個地方總顯示message錯誤,求各位大佬指教
2018-04-16
沒有main函數好像就不能運行
2018-04-16
對你沒有main函數
package com.imooc;
public class InitialTelephone {public static void main(String[] args) {
Telephone phone=new Telephone();
phone.message();
}
}