java基础
if(list.get(j).getString("property")=="JZ") {
Double up =Double.parseDouble(list.get(j).getString("mileage"));
}
//判断是否在某一站的出站
if(list.get(j).getString("property")=="CF") {
Double down = Double.parseDouble(list.get(j).getString("mileage"));
}
//判断是否在某一站下一站的进站
if(list.get(j+1).getString("property")=="JZ") {
Double up1 =Double.parseDouble(list.get(j+1).getString("mileage"));
}
//判断是否在某一站下一站的出站
if(list.get(j+1).getString("property")=="CF") {
Double down1 =Double.parseDouble(list.get(j+1).getString("mileage"));
}
if(up<Double.parseDouble(mileage)<down) {
}
up和down不让我用怎么办
------解决方案--------------------if(up<Double.parseDouble(mileage)<down) {
改成
if(up<Double.parseDouble(mileage)&&Double.parseDouble(mileage)<down) {