package com.imooc;
public class Telphone {
private float screen;
private float cpu;
private float mem;
public Telphone() {
System.out.println("construction methordwithout param execute");
}
public Telphone(float newscreen,float newcpu,float newmem) {
screen=newscreen;
cpu=newcpu;
mem=newmem;
}
}
package com.imooc;
public class initial {
/*float screen;
float cpu;
float mem;
public float getscreen() {
return screen;
}*/
/*public void setscreen(float newscreen) {
screen=newscreen;
}*/
public static void main(String[] args) {
Telphone phone=new Telphone();
Telphone phone2=new Telphone(5.0f,1.4f,2.0f);
System.out.println(phone2.screen+phone2.cpu+phone2.mem);
}
}
胜利女神在微笑
慕数据8267187
秃头披风侠0
溯源1
产品经理不是经理
相关分类