Is the diamond operator <> equivalent to <?>

Viewed 6836

I found in the util.TreeSet class that one of the constructor is calling another constructor with a new TreeMap with empty generic type.

  public TreeSet(Comparator<? super E> comparator) {
         this(new TreeMap<>(comparator));
  }

What does new TreeMap<> mean ? is that equivalent to new TreeMap<?> ?

2 Answers
Related