So looking through code of some developers, I see something like this in a lot of cases: Code (Java): Collection<T> collection = Sets.newHashSet(); in contrast to something that seems to be more obvious, which is this: Code (Java): Collection<T> collection = new HashSet<>(); The first example seems to be somewhat preferred to the latter one. From my point of view, I can see no real difference; the method seems to just return a new HashSet. What is the reason people use the first approach, compared to the second one? Is it due to the fact that you don't need to provide any type-parameters? But then you don't have to do that in the second example by using the diamond-operator (is this even an operator?) Thanks for any answers in advance!