下面是一个小列子:
把房屋面积 为40-50 以“-”为分割符分成40 50
String floorage = new String("40-50");
String floorages[] = floorage.split("-");
double min = Double.parseDouble(floorages[0]);
double max = Double.parseDouble(floorages[1]);
结果是 min:40 max:50
import org.houseRent.dao.Streetdao;
import org.houseRent.dao.impl.StreetdaoImpl;
import org.houseRent.entity.Street;