[code]Map<Integer, String> map = new TreeMap<Integer, String>();
map.put(0, "A");
map.put(30, "B");
map.put(80, "C");
map.put(100, "D");
map.put(140, "E");
int random = (int)(Math.random()*150);
return map.lowerEntry(random).getValue();[/code]我只是个搬运工, |