public class Customer01{
private boolean sex ;
public void setSex(boolean sex1){
if(sex1==true){
System.out.println("该客户性别为男");
}else{
System.out.println("该客户性别为女");
}
}
public boolean getSex(){
return sex;
}
public class OOTest03{
public static void main (String [] args){
Customer01 c = new Customer01();
c.setSex( false );
System.out.println(c.getSex());
}
}
private boolean sex ;
public void setSex(boolean sex1){
if(sex1==true){
System.out.println("该客户性别为男");
}else{
System.out.println("该客户性别为女");
}
}
public boolean getSex(){
return sex;
}
public class OOTest03{
public static void main (String [] args){
Customer01 c = new Customer01();
c.setSex( false );
System.out.println(c.getSex());
}
}