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错误,求各位大佬指教
没有main函数好像就不能运行
对你没有main函数
package com.imooc;
public class InitialTelephone {public static void main(String[] args) {
Telephone phone=new Telephone();
phone.message();
}
}