if("0".equals(user.getSex())){
    System.out.println("KKKKK");
}//这样写比较的是字符串的值user.getSex()=="0" 这样写比较的是两个对象的内存地址吧