Opened a LinkedHashSet source code today and found some interesting thing:
public class LinkedHashSet<E>
extends HashSet<E>
implements Set<E>, Cloneable, java.io.Serializable {
The question is: why do they need both "extends HashSet" and "implements Set" when HashSet already is the Set?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…