fork(1) download
  1. import java.util.*;
  2.  
  3. class Example {
  4. public static void main(String[] args) {
  5. Map<Double, String> m = new HashMap<>();
  6. m.put(Double.NaN, "a");
  7. m.put(Double.NaN, "b");
  8. System.out.println(m.size());
  9. }
  10. }
Success #stdin #stdout 0.1s 320320KB
stdin
Standard input is empty
stdout
1