調(diào)用方法時(shí)出錯(cuò)。求各位大佬指教
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();
}
? 在這個(gè)地方總顯示message錯(cuò)誤,求各位大佬指教
2018-04-16
沒有main函數(shù)好像就不能運(yùn)行
2018-04-16
對你沒有main函數(shù)
package com.imooc;
public class InitialTelephone {public static void main(String[] args) {
Telephone phone=new Telephone();
phone.message();
}
}