Open GoogleCodeExporter opened 9 years ago
Lý do lỗi:
if(orderByType.equalsIgnoreCase("desc")) {
result = ketQuaTinhDiem1.getDiemSo()>ketQuaTinhDiem2.getDiemSo()?-1:1;
} else {
result = ketQuaTinhDiem1.getDiemSo()>ketQuaTinhDiem2.getDiemSo()?1:-1;
}
Thiếu trường hợp return 0 khi bằng nhau
Original comment by ntanh...@gmail.com
on 19 Sep 2014 at 9:08
Solved
if(ketQuaTinhDiem1.getDiemSo()>ketQuaTinhDiem2.getDiemSo()){
result = -1;
}else if(ketQuaTinhDiem1.getDiemSo()<ketQuaTinhDiem2.getDiemSo()){
result = 1;
}else{
result = 0;
}
Original comment by ntanh...@gmail.com
on 19 Sep 2014 at 9:09
Original issue reported on code.google.com by
ntanh...@gmail.com
on 19 Sep 2014 at 9:08