怎么就没程序入口了 main函数里面怎么调用前面的属性方法我还不知道呢??
package chapter2;
public class Telephone02 {
private float screen;
private float cpu;
private float mem;
public float getScreen() {
return screen;
}
public void setScreen(float screen) {
this.screen = screen;
}
public float getCpu() {
return cpu;
}
public void setCpu(float cpu) {
this.cpu = cpu;
}
public float getMem() {
return mem;
}
public void setMem(float mem) {
this.mem = mem;
}
public Telephone02() {
System.out.println("无参的构造方法执行了!");
}
public Telephone02(float newscreen,float newcpu,float newmem) {
screen=newscreen;
cpu = newcpu;
mem = newmem;
System.out.println("有参的构造方法执行了!");
}
}