-1
 public class HashSet<E>
    extends AbstractSet<E>
    implements Set<E>, Cloneable, java.io.Serializable
{

        ..........
}

public abstract class AbstractSet<E> extends AbstractCollection<E> implements Set<E> {

        ...............
}

As AbstractSet is already implementing Set interface then why HashSet implements Set interface.

Mohit
  • 19
  • 3

1 Answers1

1

Maybe to make it clearer looking as HashSet that it implements Set? It doesn't make a difference to the computer, but it's helpful for the user.

Anubian Noob
  • 13,426
  • 6
  • 53
  • 75