Last Updated: October 14, 2017
·
3.122K
· YelpDeveloper

What is the difference when create Set<T> in java

Hi,

When create the Set in java, what's the diffenence between following? which one is more common.

Set<T> set = new HashSet<>();

HashSet<T> set = new HashSet<>();

Thanks,