fork download
  1. import java.util.*;
  2. import java.lang.*;
  3.  
  4. class Main
  5. {
  6. public static void main (String[] args) throws java.lang.Exception
  7. {
  8. TreeMap<Double,String> tm = new TreeMap<Double,String>();
  9. tm.put(1.203, "quick");
  10. tm.put(1.231, "brown");
  11. tm.put(1.233, "fox");
  12. tm.put(1.213, "jumps");
  13. tm.put(1.243, "over");
  14. tm.put(1.2301, "the");
  15. tm.put(1.2203, "lazy");
  16. tm.put(1.2003, "dog");
  17. for (Map.Entry<Double,String> e : tm.subMap(1.230, 1.232).entrySet()) {
  18. System.out.println(e);
  19. }
  20. }
  21. }
Success #stdin #stdout 0.03s 245632KB
stdin
Standard input is empty
stdout
1.2301=the
1.231=brown