下面是按照学号查找的一段代码,我想知道为什么要判断学号不等于?而且既然判断学号不等于0了,那么等于0就不判断了吗?求大神详解,万分感谢
public List<Xuesheng> getList(int xh)
{
String where="";
if(xh!=0)
{
where=where+" where xueHao="+xh+"";
}
return this.findAll(where);
}