赞
踩
- //补充完成该类的含参构造方法
- public Info(String name, int age, String sex, String phone) {
- this.name = name;
- this.age = age;
- this.sex = sex;
- this.phone = phone;
-
-
- }
- // 请修改该方法,以保证打印对象时输出格式如下:
- // [name='zs';age=20;sex='男';phone='18812349876']
- @Override
- public String toString() {
- return "[name='"+this.name+"';age="+this.age+";sex='"+this.sex+"';phone='"+this.phone+"']";
- }
- if(level.equals("初级")||level.equals("中级")||level.equals("高级")||level.equals("特级")){
- this.level = level;
select * from info where name=?
select * from info where sex=?
if(a!=null){
int sage = a.getSage();
String level = a.getLevel();
if(sage>=0 && sage<3 && level.equals("初级")){
return true;
}else if(sage>=3 && sage<5 && level.equals("中级")){
return true;
}else if(sage>=5 && sage<10 && level.equals("高级")){
return true;
}else if(sage>=10 && level.equals("特级")){
return true;
}else{
return false;
}
}
select * from account order by sage desc limit 1
update info set age=case when sex='男' then age+2 else age+1 end
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。