public class Z_1_10 {
private float screen;
private float DDR;
private int button;
private String description;
public float getScreen(){
return screen;
}
public void setScreen(float newscreen){
screen=newscreen;
}
public Z_1_10(){
System.out.println("无参方法已经执行了");
}
public Z_1_10(float screen,float DDR,int button){
if(screen<5.3){
screen=5.3f;
}else{
screen=screen;
}
DDR=DDR;
button=button;
System.out.println("有参方法已经执行了"+"screen="+screen+"DDR="+DDR+"button="+button);
}
}
public class ZZ_1_10 {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
Z_1_10 aa=new Z_1_10();
Z_1_10 hh=new Z_1_10(3.4f,2.4f,3);
// aa.setterScreen(3.4f,2.4,3.8);
hh.setScreen(4.5f);
System.out.println("screen is:"+hh.getScreen());
// hh.screen=5.8f;
//System.out.println("screen is:"+hh.screen);
}
}