Martin Gallauner10,806 Points
Why import java.util.Set and java.util.HashSet?
I'm not fully understand why I have to import Set and HashSet since the class HashSet implements the Set Interface?
Look forward to any help
Tri Pham18,671 Points
If you did HashSet<String> set = new HashSet<String>() instead of Set<String> set = new HashSet<String>(), then you wouldn't need to import Set.
Sławomir Lasik7,792 Points
implements key word provide the class everything that she uses. The "Implementation" of an Set interface is in java.util.Set; and "implementation" of HashSet is in java.util.HashSet; So you must include both of them in the when you use them in your class.
Here is a good explanation from JavaTutorial